RHSM: Adjust the switch to container mode for new RHSM

RHSM in RHEL 8.9+ & RHEL 9.3+ requires newly for the switch to the
container mode existence and content under /etc/pki/entitlement-host,
which in our case should by symlink to /etc/pki/entitlement.

So currently we need for the correct switch 2 symlinks:
  * /etc/pki/rhsm-host        -> /etc/pki/rhsm
  * /etc/pki/entitlement-host -> /etc/pki/entitlement

Technically we need that only for RHEL 8.9+ but discussing it with
RHSM SST, we can do this change unconditionally for any RHEL system
as older versions of RHSM do not check /etc/pki/entitlement-host.
pull/1/head
Arkady L. Shane 10 months ago
parent ba848801d8
commit 931a263cb6
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

@ -334,6 +334,7 @@ def set_container_mode(context):
return return
try: try:
context.call(['ln', '-s', '/etc/rhsm', '/etc/rhsm-host']) context.call(['ln', '-s', '/etc/rhsm', '/etc/rhsm-host'])
context.call(['ln', '-s', '/etc/pki/entitlement', '/etc/pki/entitlement-host'])
except CalledProcessError: except CalledProcessError:
raise StopActorExecutionError( raise StopActorExecutionError(
message='Cannot set the container mode for the subscription-manager.') message='Cannot set the container mode for the subscription-manager.')

Loading…
Cancel
Save