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

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."

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.