Need help understanding Katello Activation Keys


#1

Problem:
I think I might not be understanding Activation Keys correctly. Currently I have an activation key that is tied to a certain Content View. If this Content View is tied to 3 different yum repos from 3 different products. Do I have to add the subscription/repo to the activation key as well?

I registered a host through my activation key. Then I added the repo/product under the Subscriptions tab. Is there an interval where this repo will then be available to my client? Am I supposed to re-register it?
Expected outcome:
An activation key is tied to a CV. That CV has multiple repos/products tied to it. Client/Server should then see those repos on the box.


#2

Hi,

yes, you need to add subscriptions and maybe Repository Sets, too, to that activationkey. This is intended and helps people who need different subsets of their repos on different hosts to be able to manage this with only view CVs.
When you activate subscriptions or repos for a host afterwards via Foreman UI, those will be automatically refreshed the next time subscription manager checks in with Foreman (afaik, this is a 24h interval, but I might be wrong here). You can enforce this by running “subscription-manager refresh” on your host.

Greetings

Edit: The need to add subscriptions to activation keys is not there for RedHat Virtual Datacenter or per hypervisor products (if you use those). Here your activation key only needs auto-attach set to true.


#3

Okay that makes sense. A bit confusing but what is best practice if I decide to add a product to a CV and want 1000 servers to have access to that new repo/product? Doing it manually through the UI would be painful.

Also I did a test by adding a repo to a host through the Foreman UI after the fact, and then running subscription-manager refresh on the host. It still doesn’t see this new repo? Could I be doing something wrong?


#4

This issue has been fixed. Thanks Areyus for your help!

Even though I added the repo to the host, I never promoted it to the Lifecycle Environment with Katello