Foreman 1.17 managing repos

Hi folks,

Not a fault but looking for a bit of advice on how best to manage OS version specific repos.

As an example I have a Katello product defined which has an el6 and el7 repo inside.

When I attach a Centos 6 box for example to that subscription by default I get both the el6 and el7 repos which causes dependency issues during patching unless one is disabled (not a big deal but i’d rather not have to do that.)

I had considered creating the repos inside the OS products however that would duplicate repos defined in products as we have CentOS and RedHat subscriptions.

What I mean by that is that i would have the katello el6 repo defined within my Centos 6 and RedHat 6 products and that would be synced twice, I’m pretty sure I’ll have more cases like that.

Has anyone got any suggestions as to how to get round this?

Thanks.

Hi,

you might want to give activation keys with repository set settings a try.
I would suggest generating activation keys per OS/version and enabling/disabling the corresponding repos on a per-activation-key basis. Note that you can only configure repository sets for subscriptions attached to an activation key, so that solution does not work for RedHat “per-hypervisor”/virtual subscriptions (which should be handled by auto-attach).

Regards

Hello,

Brilliant, thanks for the response.

How does one go about refreshing the repository sets available to an activation key?

I’ve renamed some repositories and recreated others under different products however the old names etc are still visible under repository sets.

I’ve tried a katello-service restart to no avail.

Thanks,

Hi,

I have no experience with that in particular, but removing and re-adding the corresponding subscriptions to the activation keys might be worth a try.