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

Make CLN package repositories properly supported by the upgrade process #9

Merged
merged 6 commits into from
Mar 14, 2024

Conversation

prilr
Copy link
Collaborator

@prilr prilr commented Mar 11, 2024

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.

Copy link

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.
If you want to re-run tests or request review, you can use following commands as a comment:

  • leapp-ci build to run copr build and e2e tests in OAMG CI
  • review please to notify leapp developers of review request

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.

prilr added 3 commits March 11, 2024 14:15
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.
Copy link
Collaborator

@helldotcat helldotcat left a 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')])
Copy link
Collaborator

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'
Copy link
Collaborator

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()
Copy link
Collaborator

Choose a reason for hiding this comment

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

repo.enable()
continue

@prilr prilr merged commit c8350ad into cloudlinux:cloudlinux Mar 14, 2024
@prilr prilr deleted the cln-integration branch March 14, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants