From e8874ce0ffa19c2d47b67b7d158245f00b5aae8f Mon Sep 17 00:00:00 2001 From: Petr Stodulka Date: Fri, 27 Oct 2023 13:34:38 +0200 Subject: [PATCH] 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. jira: RHEL-14839 --- repos/system_upgrade/common/libraries/rhsm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/repos/system_upgrade/common/libraries/rhsm.py b/repos/system_upgrade/common/libraries/rhsm.py index 4a5b0eb0eb..18842021c0 100644 --- a/repos/system_upgrade/common/libraries/rhsm.py +++ b/repos/system_upgrade/common/libraries/rhsm.py @@ -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.')