Skip to content

Commit 2af314e

Browse files
committed
switch cln channel only inside overlayfs for preupgrade check
1 parent 47d9065 commit 2af314e

File tree

2 files changed

+4
-60
lines changed
  • repos/system_upgrade

2 files changed

+4
-60
lines changed

repos/system_upgrade/cloudlinux/actors/switchclnchannelreset/actor.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -332,16 +332,11 @@ def prepare_target_userspace(context, userspace_dir, enabled_repos, packages):
332332

333333
api.current_logger().debug('Checking the CLN registration status')
334334
context.call(['rhn_check'], callback_raw=utils.logging_handler)
335-
# To get packages from Spacewalk repos (aka CLN) we need to switch the CLN channel.
336-
337-
# Note that this switches the channel for the entire host system, not just the target userspace -
338-
# so if we don't reset it back to the original channel, the host system will be left in an inconsistent state.
339335

340-
# The 'switch_cln_channel_reset' actor should reset the channel back to the original state after the
341-
# transaction check phase is done - so the preupgrade checks won't affect the host system.
342-
# The 'switch_cln_channel_download' actor should take care of switching the channel back to the CL8 channel
343-
# when it's time to download the upgrade packages.
344-
cln_switch(target=int(target_major_version))
336+
# To get packages from Spacewalk repos (aka CLN) we need to switch the CLN channel.
337+
# localonly flag switches channel only inside of the overlayfs
338+
api.current_logger().debug('Switching channel to %s' % target_major_version)
339+
context.call(['cln-switch-channel', '-t', str(target_major_version), '--localonly'])
345340

346341

347342
def _query_rpm_for_pkg_files(context, pkgs):

0 commit comments

Comments
 (0)