Not supported by a valid subscription
Hello there,
currently working on automation for our RHEL9 templates and hosts. We use the combination of '--org' and '--activationkey' and because of that, the option '--auto-attach' is out of the question. Here are the steps we take :
$ /sbin/subscription-manager register --force --org xxxxxxxxx --activationkey xxxxxxxxxxxx
The registered system name is: <FQDN>
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status: Not Subscribed
Unable to find available subscriptions for all your installed products.
$ /sbin/subscription-manager attach --pool 2c9xxxxxxxxxxxxx
Successfully attached a subscription for: Extended Update Support for Red Hat Enterprise Linux (Physical or Virtual Nodes)
Though it looks fine, the status is anything but fine:
$ /sbin/subscription-manager status
+-------------------------------------------+
System Status Details
+-------------------------------------------+
Overall Status: Invalid
Red Hat Enterprise Linux for x86_64:
- Not supported by a valid subscription.
System Purpose Status: Mismatched
- The requested role "Red Hat Enterprise Linux Server" is not provided by a currently consumed subscription.
- The requested usage preference "Production" is not provided by a currently consumed subscription.
- The service level preference "Standard" is not provided by a currently consumed subscription.
We've already tried 'unregister', 'clean', and 'remove --all' and even manually removing '/etc/rhsm/syspurpose/syspurpose.json' too many times. The result is the same...
Originally we intended to use ansible (IaC) for registration, unfortunatelly had no success in our endeavors:
- name: Register and attach to the subscription (needs proxy)
community.general.redhat_subscription:
state: present
org_id: "{{ rhel_organization_id }}"
activationkey: "{{ rhel_activation_key }}"
pool_ids: "{{ rhel_pool_id }}"
server_proxy_hostname: "{{ proxy_host }}"
server_proxy_port: "{{ proxy_port }}"
server_proxy_scheme: "{{ proxy_schema }}"
force_register: true
syspurpose:
usage: "{{ rhel_sys_purpose }}"
role: "{{ rhel_role }}"
service_level_agreement: "{{ rhel_sla }}"
sync: true
Any suggestion would be most welcome.
Cheers,
A.