Enable a new repo to already registred hosts

Problem:
I recently switch to SCA, then upgrade to Foreman 3.7 / Katello 4.9
The upgrade process automatically apply overrides so my existing customs products are ok.
SCA have been much discussed, so I am not sure how to enable a new repo (Foreman client 3.7) to my existing hosts.
I added the repo to my AK as Enabled (overridden). Newly registred host are getting the setting from the but not the ones already registred (unless I force a new registration).
So what is the correct way to enable this repo to all existing hosts ?
I have read about the “manage repository sets” in the content host page. Shoud I do this action every time I had a new repo?

Expected outcome:
New repo enabled on the wanted hosts

Foreman and Proxy versions:
Foreman 3.7 Katello 4.9

Foreman and Proxy plugin versions:

Name Version
foreman-tasks 8.1.1
foreman_bootdisk 21.0.4
foreman_puppet 6.0.0
foreman_remote_execution 10.0.7
katello 4.9.2
puppetdb_foreman 6.0.2

Distribution and version:
OracleLinux 8.8

If the hosts are subscribed to a content view, just add it to the content view and when published the clients will see it.

They see it in “subscription-manager repos” but not enabled.
The status sets in the activation key has no effect on my existings hosts. :roll_eyes:

Correct. Starting with 4.9 new repositories of custom products are disabled by default. To enable it, you have set a override to enabled for each host, which needs it.

Set it on activation keys to enable it for new hosts registering with that key. Changing the activation key does not change hosts which have already been registered using that key.

You can also set overrides with subscription-manager on the hosts, if you want.

I am not sure why you would want to add a new repository to a product and enable this repository immediately on ALL existing hosts. Can you elaborate, where you think you’ll need that?

It makes sense

My products are specifically dedicated to an OS version(CentOS 7 , Oracle Linux 8, OL9 etc…) and a content-view to manage version publication.
So after upgrading Foreman, I deploy the new Foreman-client repo to them.

Exactly. So you don’t want to enable the new repositories on all hosts, but only the hosts which are actually supposed to use them. There is no point enabling the el7 foreman-client repository on your el8 or el9 hosts, even if your content view makes sure to match the repo with the os major version.

Thus, if there is a new version of foreman, you’ll add three foreman-client repositories (el7,el8,el9) and then enable el7 on all el7 hosts, el8 on all el8 hosts, and so forth.

Enabling all three on all hosts doesn’t really make sense and it also prevents you from ever switching a host to Library environment without content view, which I find quite useful to see what new rpms are there before they ever get into a content view.

If you added the oracle linux kvm/utils repository for ol9 to your foreman server you wouldn’t want to enable that on all your hosts including centos7 and ol8 either, wouldn’t you?

I haven’t been clear, of course I enable the matching repo and OSes with my AK/Products/CV strategy.

Thanks for your answer.

Getting back to the original question: You can manage content overrides for existing hosts (without re-registering) from Hosts > Content Hosts. Select the host(s) you want to change and then Select Action > Manage Repository sets.