Simple Content Access for CentOS repos

Problem:

I see there is supposed to be a checkbox for “Simple Content Access” under “Administer” > “Organizations”, and if I’m reading the documentation correctly, the absence of this checkbox is due to their being no imported manifest.

I believe not having SImple Content Access turned on is causing subscription-manager to leave my newly deployed test hosts in with an “Unknown Subscription” status, because it can’t set the status to “Simple Content Access”

My question is, how can I enable this without Downloading a manifest from Redhat. I’m not doing any testing with RHEL, only free/upstream operating systems.

Am I basically stuck unless I pay for some kind of subscription even though I won’t be using it?

Expected outcome:

I would like to see if the lack of having “Simple Content Access” being enabled for my Organization is the root cause of why subscription manager is leaving my newly registered CentOS 8 hosts in a “Unknown Subscription” state after building them without buying a Subscription for RHEL content that I don’t need for my testing.

Foreman and Proxy versions:
katello-4.2.0.rc1-1.el8.noarch
foreman-3.0.0-1.el8.noarch

Foreman and Proxy plugin versions:
N/A

Distribution and version:
foreman-3.0.0-1.el8.noarch

Other relevant data:

Hi @Mamba

You’re right that the absence of a manifest is why you’re not seeing the Simple Content Access checkbox on the organization. Right now SCA is only offered if a manifest is imported. However, with SCA off the normal subscription status is “Fully entitled,” not “unknown.” (SCA did cause an “Unknown subscription status” previously, but this wording has since been changed to “Simple Content Access.”)

Did you register the host using the generated commands on the Register Host page? If so, the unknown subscription status may be a bug. To work around it, re-register the host using subscription-manager rather than the Register Host page:

subscription-manager unregister
subscription-manager register --activationkey <MY_ACTIVATION_KEY> --org <MY_ORG>
2 Likes

Yes I registered using the register host page and ran the bash script on the content host.

Because I like the simplicity of just doing the copy paste from the host registration page

I ended up putting this in the Linux host_init_config default, it fixes the “Unknown Subscription” but it definitely feels hacky.

echo "Resetting Activation Key"
organizationid=$(subscription-manager identity | grep "^org ID:")
organizationid="${organizationid#org ID: }"
organizationid=$(echo "$organizationid" | awk '{ sub(/^[ \t]+/, ""); print }')

activationkey=$(subscription-manager list --consumed | grep "^Subscription Name:")
activationkey="${activationkey#Subscription Name:}"
activationkey=$(echo "$activationkey" | awk '{ sub(/^[ \t]+/, ""); print }')

subscription-manager register --force --org="$organizationid" --activationkey="$activationkey"
3 Likes

Just wanted to make a quick note since I’ve gotten a non-zero amount of likes on my quick hack.

This line:

activationkey=$(subscription-manager list --consumed | grep "^Subscription Name:")

Worked for me because of 2 important reasons:

  1. I had one “Product”
  2. My “Product” Name matched exactly, the name of my “Activation Key”

So if you end up needing to run a hack like this keep in mind you’d have to account for those issues in your scripts logic.

I’m looking forward to GA release this week, maybe this weird registration issue will disappear.

We have a fix for this issue but it won’t be present in the 4.2.0 release, but rather 4.2.1 → Bug #33572: Unknown subscription status on Katello webui after successful host registration. - Katello - Foreman

The change is small. I’d be tempted to patch my own system if it were a pain point for me (taking the necessary safety precautions - like a backup).

1 Like