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

Switch CLN channel locally until the last stage of the upgrade #32

Merged
merged 9 commits into from
Feb 14, 2025

Conversation

Monstrofil
Copy link
Collaborator

During upgrade, we should notify CLN about change of the OS version to update systemid file and the corresponding channel that system is subscribed to.

Before this patch we had logic like following:

  • during preparation of overlayfs we switched channel to target_os_version globally (both for host machine and overlayfs)
  • at later stages we reset it back to original

This caused problems: if upgrade process is inhibited or crashed, target os channel persisted on host machine and could lead to accidental upgrade on host machine.

This change instead uses local "channelOverride" rhn-client-tools option which changes the channel that we are subsribed to without notification of CLN, thus host machine and overlayfs now can be subscribed to different channels and do not interfire.

Smaller changes and their explanation:

  • the way that we copy rhn files to overlayfs is not straightforward and works through TargetUserSpacePreupgradeTasks artifact, instead of copying them in multiple places (TargetUserSpacePreupgradeTasks, TargetUserSpaceUpgradeTasks, copy_files in overlaygen).
  • cllicense check splitted into actors that check license and produce list of files to copy
  • channel switch logic is not two-step process: during overlayfs creation we change subscription locally using up2date config, on FirstBootPhaseTag we notify CLN and change it permanently

Oleksandr Shyshatskyi added 8 commits February 6, 2025 19:15
override channel only after all files
are copied to target namespace
Intead of checking cl license and at the same time providing
TargetUserSpacePreupgradeTasks in on actor, split this logic into two

Also stop producing TargetUserSpaceUpgradeTasks as requirements will
be already fulfilled with TargetUserSpacePreupgradeTasks execution.
With recent changes in spec file, we require proper version
to be installed using yum/dnf instead of manual version checking.
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 mergeable.
If you want to request a review or rebuild a package in copr, you can use following commands as a comment:

  • review please @oamg/developers to notify leapp developers of the review request
  • /packit copr-build to submit a public copr build using packit

Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build. If you need a different version of leapp from PR#42, use /packit test oamg/leapp#42

It is possible to schedule specific on-demand tests as well. Currently 2 test sets are supported, beaker-minimal and kernel-rt, both can be used to be run on all upgrade paths or just a couple of specific ones.
To launch on-demand tests with packit:

  • /packit test --labels kernel-rt to schedule kernel-rt tests set for all upgrade paths
  • /packit test --labels beaker-minimal-8.9to9.3,kernel-rt-8.9to9.3 to schedule kernel-rt and beaker-minimal test sets for 8.9->9.3 upgrade path

[Deprecated] To launch on-demand regression testing public members of oamg organization can leave the following comment:

  • /rerun to schedule basic regression tests using this pr build and latest upstream leapp build as artifacts
  • /rerun 42 to schedule basic regression tests using this pr build and leapp*PR42* as artifacts
  • /rerun-sst to schedule sst tests using this pr build and latest upstream leapp build as artifacts
  • /rerun-sst 42 to schedule sst tests using this pr build and leapp*PR42* as artifacts

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 contact leapp-infra.

@prilr prilr merged commit 9f840f9 into cloudlinux Feb 14, 2025
@prilr prilr deleted the clos-3211-local-cln-switch branch February 14, 2025 08:50
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