Skip to content

Commit

Permalink
RHSM: Adjust the switch to container mode for new RHSM
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pirat89 committed Oct 27, 2023
1 parent 6661e49 commit bceb0ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions repos/system_upgrade/common/libraries/rhsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ def set_container_mode(context):
return
try:
context.call(['ln', '-s', '/etc/rhsm', '/etc/rhsm-host'])
context.call(['ln', '-s', '/etc/pki/entitlement', '/etc/pki/entitlement-host'])
except CalledProcessError:
raise StopActorExecutionError(
message='Cannot set the container mode for the subscription-manager.')
Expand Down

0 comments on commit bceb0ce

Please sign in to comment.