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

I am having a similar issue in 6.4.x. When updating / promoting a new version of a content view with a new repo (eg. 2.0) to a lifecycle environment, the clients don't see the changes / new packages (reflected in package count in the repo), they only see 1.0 content.

Clearing yum cache, refreshing subscription manager, restarting rhsmcertd on the client all provide nothing. Waiting the 4 hours as suggested (leaving it over night), still nothing.

As soon as you unregister / re-register the node to the exact same lifecycle environment through the same activation key, everything from the new version of the content view (2.0) is available immediately.

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.

I can also confirm this doesn't work (6.3.5). We're overriding a repo to enabled and running a subscription manager refresh, and the new repo does not show up.

I am also seeing exactly what Sinan and Rob describe when enabling a repo in repository sets in 6.4.

This isn't changing activation keys and expecting clients to update, this is just changing content repos the client should see.

An update on this.

  • Satellite 6.4.3
  • RHEL 7.5

I have added a new repository in Satellite and did the usual things (publish, promote, update activation key etc). The client does see the new repository with "subscription-manager repos". I noticed that the repository is disabled by default, so I changed it to Enabled (override) in Satellite.

When I check on the client, the repository is still disabled, even after "subscription-manager refresh".

What I can do is (on the client): subscription-manager repos --enable= OR reregister the client.

But I expect, when I set a setting in Satellite, that the client inherit the settings, but unfortunately it does not.

Any ideas?

We are also experiencing the same issue. edit: (Sat 6.4.3, RHEL 7.6) after adding a new repo to a a content view, and making sure to publish&promote it, "subscription-manager refresh" does not get the newly added repos. the out put sudo subscription-manager repos --list does not change. (no new repo listed)

  • the new subscription is listed on the subscriptions tab of the content host.
  • The repo is "override enabled" on the repository set tab of the content host.

looking in /etc/yum.repos.d/redhat.repo on the client shows no listing of the newly added repository. running subscription-manager refresh does not change that. rebooting does not change that. (and shouldn't, imho)

update. After going thru the configuration again, I found that my client was in the wrong CV/LE. arg! right? I double checked my activation key, and it is set to put it in the correct CV/LE, but it doesn't end up that way in satellite. very strange. Anyways, I self-reply to say this: remember to double check all the settings for a content host in satellite. I'm not sure how it got mis-configured in 15 minutes of it's (the client) existence, but something should have turned left at Albuquerque.

Activation keys do not apply retroactively. They only apply at first registration.

Also, if you are using multiple keys during registration, the rightmost (the key that is furthest to the right) wins.

Thanks, Rich. My situation was an initial registration so not exactly like the OP. Although while troubleshooting, I did run into the conditions of the OP.

I thought activation keys behaved more like a chain, at least for the "repository sets". I also thought that I had to specify a CV/LE. After reading your reply, I re-investigated the activation keys and discovered that I do not have to specify the CV/LE. That fixed my issue.