-
Notifications
You must be signed in to change notification settings - Fork 5
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
Make CLN package repositories properly supported by the upgrade process #9
Conversation
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable.
Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra. |
CLN registration requires more parameters than we have during Leapp transaction by default. We can leave registration to the user and just check that the system is in a correct state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
# Copy RHN data independent from RHSM config | ||
if os.path.isdir('/etc/sysconfig/rhn'): | ||
context.call(['/usr/sbin/rhn_check'], callback_raw=utils.logging_handler) | ||
run(['rm', '-rf', os.path.join(target_etc, 'sysconfig/rhn')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shutil.rmtree(os.path.join(target_etc, 'sysconfig/rhn'))
could be slightly faster
new_lines = [] | ||
for line in lines: | ||
if 'enabled' in line: | ||
line = 'enabled = 1\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if \n
is missing on the last file line?
self.base.repos.all().disable() | ||
|
||
aws_region = None | ||
|
||
for repo in self.base.repos.all(): | ||
# we always want to have CLN repos enabled | ||
if type(repo).__name__ == "SpacewalkRepo": | ||
repo.enable() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repo.enable()
continue
Spacewalk plugin and CLN-related configs previously were not explicitly set up for the isolated upgrade environment.
That caused a number of issues that were sporadic and hard to debug - and in general was unreliable.