Client hosts connected to Red Hat Satellite server shows package count as 0

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux
  • Red Hat Satellite 6

Issue

  • Repositories on client hosts connected to Red Hat Satellite/Capsule server shows package count as 0 when yum repolist is run.

Resolution

  • Comment out the line starting with reposdir in /etc/yum.conf on client system registered with Red Hat Satellite server.

      [root@localhost ~]#  grep reposdir /etc/yum.conf
    
       #reposdir=repo1
    

For more KB articles/solutions related to Red Hat Satellite 6.x Client Subscription Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Client Subscription Issues

Root Cause

  • If reposdir is not set, yum uses the default directory /etc/yum.repos.d/.

Diagnostic Steps

  • Check /etc/yum.conf on client system registered with Red Hat Satellite server.

      [root@localhost ~]# cat /etc/yum.conf
      [main]
      cachedir=/var/cache/yum/$basearch/$releasever
      keepcache=0
      debuglevel=2
      logfile=/var/log/yum.log
      reposdir=repo1
    
  • Repository is already enabled on client system registered with Red Hat Satellite server as shown below.

      [root@localhost ~]# subscription-manager repos --list-enabled
      +----------------------------------------------------------+
      Available Repositories in /etc/yum.repos.d/redhat.repo
      +----------------------------------------------------------+
      Repo ID:   rhel-7-server-satellite-tools-6.9-rpms
      Repo Name: Red Hat Satellite Tools 6.9 (for RHEL 7 Server) (RPMs)
      Repo URL:  https://satellite_hostname/pulp/repos/Redhat/Library/content/dist/rhel/server/7/7Server/$basearch/sat-tools/6.9/os
      Enabled:   1
    
      Repo ID:   rhel-7-server-rpms
      Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
      Repo URL:  https://satellite_hostname/pulp/repos/Redhat/Library/content/dist/rhel/server/7/$releasever/$basearch/os
      Enabled:   1
    
  • Yum repolist on client system registered with Red Hat Satellite server shows below :

      [root@localhost ~]#  yum repolist -v
      Not loading "rhnplugin" plugin, as it is disabled
      Loading "product-id" plugin
      Loading "search-disabled-repos" plugin
      Loading "subscription-manager" plugin
      Updating Subscription Management repositories.
      Config time: 0.829
      Yum version: 3.4.3
      Setting up Package Sacks
      repolist: 0
    
SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.