Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHSM: Adjust the switch to container mode for new RHSM #1136

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a cosmetic question: you mentioned that this is only needed for RHEL-8.9+. On older releases, does this result in a dangling symlink or does the /etc/pki/entitlement file exist there as well? (I don't see how a dangling symlink would cause a failure since it's unused on those older versions so that's why I don't consider the answer to this question to be a blocker).

Copy link
Member Author

@pirat89 pirat89 Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abadger yes, the directory exists on all systems. the difference is that /etc/pki/entitlement-host has not been created in the past and was not checked by rhsm. so in both cases it is not expected that our symlink will be dangling.

RHEL 7 subscribed system:

[root@localhost ~]# ls /etc/pki
CA  ca-trust  consumer  entitlement  java  nssdb  nss-legacy  product  product-default  rpm-gpg  rsyslog  tls

(owned by subscription-manager rpm)

except CalledProcessError:
raise StopActorExecutionError(
message='Cannot set the container mode for the subscription-manager.')
Expand Down
Loading