Update Available Repositories for Client

Latest response

I have a created an activation key and registered clients using the activation key. After some time, there was a need to add a new repository. I have synced the repository in Satellite, coupled it to a Content View and Published + Promoted the Content View.

Now, when I do a 'subscription-manager refresh' on the Clients, the new repository is not available or listed with 'subscription-manager repos'. It only becomes available / get listed when I unregister + register the Client against the Satellite server.

is this normal behavior?

Responses

Hello

Updating an activation key will not have any effect on hosts registered previously with that activation key.

But rather than unregister and registering again, try to see if the new repository is available to the hosts.

# subscription-manager list --all --available

Command above is to look for a subscription, and on second thoughts, I think you just need to look for the repo:

# subscription-manager repos --list

and then attach the new one:

# subscription-manager repos --enable repository

These commands are explained in Managing Software Repositories in the Red Hat Enterprise Linux 7 System Administrator's Guide.

Well, I'd say that's exactly what the parent poster was saying it was not working. I suppose so because that's exactly what's happening to me: new repo added to a product, promote, etc.

Then, on a subscribed host (with a proper activation key), I follow the following procedure (augmented for "just in case"): yum clean all && subscription-manager refresh

The repo still doesn't get listed by subscription-manager repos.

If I unsubscribe the host and resubscribe it, then the repo appears as it should.

I've got the same issue. It's interesting that on some servers registered with the same key, available repository list gets updated with "subscription-manager refresh" command, other require the host re-registering.

Any solution as I'm faced with the same issue?

I had opened a case with RH - it looks like when the content view is changed, the only way to refresh the repo list is to re-register the host. I use Ansible, so I added these tasks to each software management playbook:

---
  tasks:

  - name: Unregister
    redhat_subscription:
      state: absent

  - name: Re-register
    redhat_subscription:
      state: present
      activationkey: "{{ activ_key }}"
      org_id: "{{ org }}"

I am afraid the information that you were given is incorrect. You do NOT need to re-register in order to show an updated repository list after changing content views server-side. You can do either of:

  • call subscription-manager refresh OR
  • wait (up to) 4 hours for the next check-in of the rhsmcertd daemon which will update /etc/yum.repos.d/redhat.repo

(sorry, got something wrong, never mind)

This does not work. With Satellite 6.2 it wasn't work, now I had the opportunity to test it with 6.4 as well and still no success.

Yesterday around 6:00 pm we published + promoted the content view and updated the activation key.

Today (09:00 am), command "subscription-manager refresh" + "subscription-manager repos" was still not listing the new repository.

After a re-registration the repository was shown.

Code snippet (2 new repo's, _Dell_os_dependent and _Dell_os_independent)

# subscription-manager refresh
4 local certificates have been deleted.
All local data refreshed

# subscription-manager repos
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-7-server-rh-common-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - RH Common (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/rh-common/os
Enabled:   0
Repo ID:   rhel-7-server-optional-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Optional (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/optional/os
Enabled:   0
Repo ID:   rhel-ha-for-rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux High Availability (for RHEL 7 Server) (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/highavailability/os
Enabled:   1
Repo ID:   rhel-7-server-rhn-tools-rpms
Repo Name: RHN Tools for Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/rhn-tools/os
Enabled:   0
Repo ID:   rhel-7-server-openstack-13-tools-rpms
Repo Name: Red Hat OpenStack Platform 13 Tools for RHEL 7 Server (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/openstack-tools/13/os
Enabled:   1
Repo ID:   rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/os
Enabled:   1
Repo ID:   rhel-7-server-satellite-tools-6.4-rpms
Repo Name: Red Hat Satellite Tools 6.4 (for RHEL 7 Server) (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/sat-tools/6.4/os
Enabled:   0
Repo ID:   rhel-7-server-supplementary-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Supplementary (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/supplementary/os
Enabled:   0
Repo ID:   rhel-7-server-extras-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Extras (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/extras/os
Enabled:   1
Repo ID:   rhel-7-server-openstack-13-rpms
Repo Name: Red Hat OpenStack Platform 13 for RHEL 7 (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/openstack/13/os
Enabled:   1

# yum clean all
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
Cleaning repos: rhel-7-server-extras-rpms rhel-7-server-openstack-13-rpms rhel-7-server-openstack-13-tools-rpms rhel-7-server-rpms rhel-ha-for-rhel-7-server-rpms
Other repos take up 371 k of disk space (use --verbose for details)
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager

# subscription-manager repos
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-7-server-rh-common-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - RH Common (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/rh-common/os
Enabled:   0
Repo ID:   rhel-7-server-optional-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Optional (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/optional/os
Enabled:   0
Repo ID:   rhel-ha-for-rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux High Availability (for RHEL 7 Server) (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/highavailability/os
Enabled:   1
Repo ID:   rhel-7-server-rhn-tools-rpms
Repo Name: RHN Tools for Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/rhn-tools/os
Enabled:   0
Repo ID:   rhel-7-server-openstack-13-tools-rpms
Repo Name: Red Hat OpenStack Platform 13 Tools for RHEL 7 Server (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/openstack-tools/13/os
Enabled:   1
Repo ID:   rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/os
Enabled:   1
Repo ID:   rhel-7-server-satellite-tools-6.4-rpms
Repo Name: Red Hat Satellite Tools 6.4 (for RHEL 7 Server) (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/sat-tools/6.4/os
Enabled:   0
Repo ID:   rhel-7-server-supplementary-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Supplementary (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/supplementary/os
Enabled:   0
Repo ID:   rhel-7-server-extras-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Extras (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/extras/os
Enabled:   1
Repo ID:   rhel-7-server-openstack-13-rpms
Repo Name: Red Hat OpenStack Platform 13 for RHEL 7 (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/openstack/13/os
Enabled:   1

# subscription-manager register --org="<ORG>" --activationkey="<Activation key>" --force
Unregistering from: <SAT Server>:8443/rhsm
The system with UUID bc6d547c-0548-486d-83a8-96d0ccd1866a has been unregistered
All local data removed
The system has been registered with ID: 14ab2a1d-bff5-48df-b0e3-b567cce5ed1b
The registered system name is: am5-computealt1-3.stack.<ORG>.nl
Installed Product Current Status:
Product Name: Red Hat OpenStack
Status:       Subscribed
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed
Product Name: Red Hat Enterprise Linux High Availability (for RHEL Server)
Status:       Subscribed

# subscription-manager repos
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   <ORG>_Dell_os_dependent
Repo Name: os dependent
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/custom/Dell/os_dependent
Enabled:   0
Repo ID:   rhel-7-server-rh-common-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - RH Common (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/rh-common/os
Enabled:   0
Repo ID:   rhel-7-server-optional-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Optional (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/optional/os
Enabled:   0
Repo ID:   <ORG>_Dell_os_independent
Repo Name: os independent
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/custom/Dell/os_independent
Enabled:   0
Repo ID:   rhel-ha-for-rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux High Availability (for RHEL 7 Server) (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/highavailability/os
Enabled:   1
Repo ID:   rhel-7-server-rhn-tools-rpms
Repo Name: RHN Tools for Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/rhn-tools/os
Enabled:   0
Repo ID:   rhel-7-server-openstack-13-tools-rpms
Repo Name: Red Hat OpenStack Platform 13 Tools for RHEL 7 Server (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/openstack-tools/13/os
Enabled:   1
Repo ID:   rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/os
Enabled:   1
Repo ID:   rhel-7-server-openstack-13-rpms
Repo Name: Red Hat OpenStack Platform 13 for RHEL 7 (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/openstack/13/os
Enabled:   1
Repo ID:   rhel-7-server-supplementary-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Supplementary (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/$releasever/$basearch/supplementary/os
Enabled:   0
Repo ID:   rhel-7-server-extras-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Extras (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/extras/os
Enabled:   1
Repo ID:   rhel-7-server-satellite-tools-6.4-rpms
Repo Name: Red Hat Satellite Tools 6.4 (for RHEL 7 Server) (RPMs)
Repo URL:  https://<SAT Server>/pulp/repos/<ORG>/AM5/RHEL7-Openstack-13/content/dist/rhel/server/7/7Server/$basearch/sat-tools/6.4/os
Enabled:   1

It would make it easier to troubleshoot if "subscription-manager identity" would tell you which version you were looking at:

[root@capsule6 ~]# subscription-manager identity
system identity: 8c43f86f-63d6-40eb-968a-448e6c2361f5
name: capsule6
org name: ANZ
org ID: ANZ
environment name: ENV_SAT6/Satellite_6_Capsule_Server_for_RHEL_7_x86_64_

But it doesn't.

I raised it as an enhancement but was thrown out by Engineering:

"after a review process by our Engineering team this  RFE was rejected by Satellite Product Management. This happened due to less interest of such feature by other customers."

I'm still new to Satellite and RHEL, but yes, it would be pretty awesome to see the CV version each box was running on. I can see how that would help with troubleshooting.

apologies in advance, I am trying to identify the best way to ingest repos, that are added to the activation key after registration. I would like to not register again.

Registering again should be avoided if possible. And there is no need for it usually. Adding new repos to (group of hosts) is pretty straightforward.

  • Sync the repos into Satellite.
  • Add said repos to whichever content views that require them.
  • Publish / Promote said content views.
  • If the new repos require a new subscription, attach the new subscription to the hosts (this can be done via a bulk action in the UI or via the CLI)
  • Enable the repo (so that it is visible in the yum configuration). Again, this can be done via a bulk action in the UI or CLI.

Lastly, so that new hosts are provisioned with the correct repos, you also need to update acttivation keys to enable the repo and provide the subscription that is needed (as necessary)

This wasn't working for me when I started this topic (Satellite 6.2). I will try it once more and provide you with feedback.