Iâve added synched yum repos for CentOS7.7 and EPEL7. I created content views for each and then I created a composite view called CentOS_Full which has been promoted to all lifecycles, I also did this for each of the members of the composite view.
I then created Activation keys for the tst and dev lifecycles that links to the composite view and the respective lifecycle environment. There are packages available in each content view/repository.
After installing subscription-manager and the katello-ca-consumer I successfully register the host using the activation key, but I get âNo products installed.â
I do not have that much experience with composite views, but I usually forget to add the subscriptions to the activation key under Content > Activation Keys, my-key > Subscriptions tab.
Thanks for the reply. I didnât see it until now. I have them added to the Subscriptions tab and no luck. The registered system isnât seeing the repos.
I am missing experience with CentOS depoyment via Katello, but from what I understand I would take the following guess whatâs happening here:
The âNo products installedâ message is fine for CentOS. This should only relate to RedHat Products (which subscription-manager is mainly built around) and you should be able to savely ignore that.
Due to this, though, auto-attach most likely will not work. You have to assign subscriptions and configure repository overrides with your activation keys to get the repositories.
If you want to make sure your CCV/CV setup is working in general, you can use sudo subscription-manager repos --list-disabled to see if any repos are available. If this returns the repos you are expection your contentview setup is working and you probably only need to adjust the activation keys.
Side note: If you only access your content/repos through CCVs, there is no need to promote individual CVs to the lifecycle environments. There is no harm in promoting them, but skipping that step if you do not access them directly can save quite some time when updating the repos
So hereâs my output of a host thatâs registered with an Activation Key and has subscriptions added with enabled products. Do I still have to overrride?
[root@fmch02 yum.repos.d]# subscription-manager repos --list-disabled
This system has no repositories available through subscriptions.
Hereâs some additional info pulled with hammer:
hammer activation-key list --organization
â|------------------|----------------|-----------------------|-------------
ID
NAME
HOST LIMIT
LIFECYCLE ENVIRONMENT
CONTENT VIEW
2
CentOS7_Full_DEV
1 of Unlimited
dev
CentOS7_Full
3
CentOS7_Full_LIB
1 of Unlimited
Library
CentOS7_Full
1
CentOS7_Full_TST
1 of Unlimited
tst
CentOS7_Full
â
------------------
----------------
-----------------------
-------------
hammer content-view list --organization
----------------|---------------------------|--------------------------------------|-----------|---------------------|-------------------
CONTENT VIEW ID
NAME
LABEL
COMPOSITE
LAST PUBLISHED
REPOSITORY IDS
6
CentOS6
CentOS6
false
8
CentOS6_Full
CentOS6_Full
true
3
CentOS7
CentOS7
false
2020/02/20 18:19:17
4, 1, 3, 2
7
CentOS7_Full
CentOS7_Full
true
2020/02/20 18:21:26
11, 12, 13, 14, 19
2
Default Organization View
4b66f64b-7321-480f-b9a7-1402a3a4a074
false
2020/02/20 00:44:52
4
EPEL6
EPEL6
false
5
EPEL7
EPEL7
false
2020/02/20 18:19:30
10
----------------
---------------------------
--------------------------------------
-----------
---------------------
-------------------
[root@fman02]# hammer host info --id â10â
Id: 10
Name: fmch02.example.com
Organization: example
Location: ussd
Cert name: fmch02.example.com
Managed: no
Installed at:
Last report:
Uptime (seconds): 3232777
Status:
Global Status: Warning
Network:
IPv4 address: X.X.X.X
IPv6 address:
MAC: 00:50:56:b7:aa:97
Domain: example.com
Network interfaces:
You most likely have to attach subscriptions to those activation keys. I know itâs conter-intuitive, but Katello generates âvirtualâ subscriptions for every non-RedHat product that emulates the behaviour of RedHat subscriptions.
You can find those via hammer subscription list --organization yourorg. You can then assign those to the activation key using hammer activation-key add-subscription --organization yourorg --name youractivationkey --subscription-id yourproductsid. If you want to fine-tune which repos are enabled on your hosts by default, you can use hammer activation-key content-override, but I donât know how to use that hammer command. In the UI, this is under âContentâ -> âActivation keysâ -> Select One -> âRepository Setsâ.
Iâll confirm this behavior. Build products, build download content views, build composite content views for my environments, build the life cycle environments, publish the composite content views, build activation keys (turning off auto-attach, manually selecting subscriptions, and disabling repositories that shouldnât be available to a particular key.)
@jkalchik I donât see any indication that Iâve fallen into that issue. I check the host log and everything is clean with no errors. The expiration dates are all 2049 for my products. It just doesnât register any products until I add them directly to the host. The frustrating part is that I built everything with hammer commands for reproducibility and the first environment I built works fine. Activation keys provide subscriptions as expected. The only difference is that with the current env I added Host Groups and setup more of the pxe booting environment, but I donât think that impacts the Activation Keys.
I use host groups as well (and moving up the tree for parameters,) and those all seem to work pretty well. I am going to have to get PXE booting working one of these days.
That is ânormalâ behaviour. The redhat.repo file is autocreated by subscription-manager.
Have you tried disabling auto-attach for the activation-key? hammer activation-key update --auto-attach no --name CentOS7_Full should do the trick. Then resubscribe the system with the updated key.
If that still does not work, please provide output for the following commands:
subscription-manager status
subscription-manager identity
subscription-manager list --available
subscription-manager list --consumed
Ok, so everything seems to be working as expected. I didnât have to disable the auto attach and when I looked this morning all repos were in the redhat.repo file. Is it recommended to remove auto attach for the keys? Whatâs the best way to add a new reopo to a host when the activation key gets a new subscription? Re-register with --force?
Thatâs funny. Using the methodology I described above, /etc/yum.repos.d/redhat.repo is populated with descriptions of all repositories visible through a lifecycle environment (disabled as appropriate by overrides in activation keys.)
-rw-r--r--. 1 root root 8475 Mar 17 09:53 redhat.repo
As I mentioned I am missing experience with CentOS via Katello. For RHEL it is recommended to leave it on and if you donât experience any further problems with it, you can leave it on I would suppose.
Sorry, I was probably unprecise here: What I meant is that the file is there, even if the system is not correctly subscribed and has no repos available. In that case, it is normal that itâs empty.
That is an option, but probably not the best one.
My recommendation would be to nuse subscription-manager attach --pool poolid.
You can get the poolid from one of your systems via subscription-manager list --available. As long as you are not using RedHat Virtual Datacenter/Per-Hypervisor Licences, the poolid should be the same for all systems. So for CentOS or third-party/custom repositories, that should be the case.