Skip to content

Commit 1f68198

Browse files
committed
CLOS-4056: Tighten CLN-related actor comments and clarifications
1 parent 223bd73 commit 1f68198

8 files changed

Lines changed: 39 additions & 48 deletions

File tree

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ class CheckRhnVersionOverride(Actor):
2020
@run_on_cloudlinux
2121
def process(self):
2222
if not is_cln_package_channel_active():
23-
# CLOS-4056: versionOverride only matters when CLN is delivering
24-
# packages - the upgrade rewrites it to drive channel selection.
25-
# On no-auth (SWNG) systems the package channel is cl-channel,
26-
# not CLN, so there is nothing to inspect or warn about even if
27-
# /etc/sysconfig/rhn/up2date is still present from registration.
23+
# CLOS-4056: versionOverride only matters when CLN is delivering packages,
24+
# since the upgrade rewrites it to drive channel selection.
25+
# On no-auth systems this does not apply.
2826
return
2927

3028
up2date_config = '/etc/sysconfig/rhn/up2date'

repos/system_upgrade/cloudlinux/actors/enableyumspacewalkplugin/libraries/enableyumspacewalkplugin.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
ParserClass = configparser.ConfigParser
1111

1212

13-
# DNF plugin config path on the target system (CL8). FirstBoot runs after the
14-
# target OS is already in place; on CL8 the plugin package is
15-
# dnf-plugin-spacewalk (PES replacement for CL7's yum-rhn-plugin,
16-
# pes-events id=1586) and its config ships with enabled=0.
13+
# DNF plugin config path on the target system (CL8).
14+
# FirstBoot runs after the target OS is already in place;
15+
# on CL8 the plugin package is dnf-plugin-spacewalk
16+
# (PES replacement for CL7's yum-rhn-plugin, pes-events id=1586)
17+
# and its config ships with enabled=0.
1718
DEFAULT_CONFIG_PATH = '/etc/dnf/plugins/spacewalk.conf'
1819

1920

@@ -24,8 +25,8 @@ def _enable_plugin(config_path, parser_cls=ParserClass, log=None):
2425
when the plugin is not installed, and otherwise a human-readable
2526
problem description suitable for a Leapp report.
2627
27-
Absence of `config_path` is treated as a silent skip: on no-auth /
28-
SWNG systems (CLOS-4056) `rhn-client-tools >= 3.0.1` Obsoletes the
28+
Absence of `config_path` is treated as a silent skip: on no-auth
29+
systems (CLOS-4056) `rhn-client-tools >= 3.0.1` Obsoletes the
2930
`dnf-plugin-spacewalk` package, so the config file is either gone by
3031
then, or doesn't do anything.
3132
"""

repos/system_upgrade/cloudlinux/actors/enableyumspacewalkplugin/tests/test_enableyumspacewalkplugin.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ def _write(tmp_path, body):
1717
def test_missing_config_is_silent_skip(tmp_path):
1818
"""Config file absent -> silent skip: no change, no title, no report.
1919
20-
On no-auth / SWNG systems (CLOS-4056) the dnf-plugin-spacewalk
21-
package is Obsoleted by rhn-client-tools >= 3.0.1 and the config
22-
file is absent by design. Emitting a 'not found' report there
23-
would be noise.
20+
On no-auth systems (CLOS-4056) the dnf-plugin-spacewalk
21+
package is Obsoleted by rhn-client-tools >= 3.0.1.
22+
Emitting a 'not found' report there would be noise.
2423
"""
2524
changed, title = _enable_plugin(str(tmp_path / "absent.conf"), ParserClass)
2625
assert changed is False

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ class PinClnMirror(Actor):
2727
def process(self):
2828
"""Pin CLN mirror"""
2929
if not is_cln_package_channel_active():
30-
# CLOS-4056: pinning the CLN mirror is only meaningful when CLN
31-
# is delivering packages. On no-auth (SWNG) systems packages come
32-
# from cl-channel via mirrorlist, so there is nothing to pin -
33-
# registration may still be in place but is irrelevant here.
30+
# CLOS-4056: pinning the CLN mirror is only meaningful when CLN is delivering packages.
31+
# With the no-auth repo scheme active, there's no point in doing so.
3432
api.current_logger().info(
3533
"CLN is not the active package channel; skipping mirror pinning"
3634
)

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ class ResetRhnVersionOverride(Actor):
1818
@run_on_cloudlinux
1919
def process(self):
2020
if not is_cln_package_channel_active():
21-
# CLOS-4056: versionOverride is only set/used by the CLN package
22-
# channel flow. If the system isn't on CLN for packages, leave
23-
# /etc/sysconfig/rhn/up2date alone - registration metadata there
24-
# is not ours to touch.
21+
# CLOS-4056: versionOverride only matters when CLN is delivering packages,
22+
# since the upgrade rewrites it to drive channel selection.
23+
# On no-auth systems this does not apply.
2524
return
2625

2726
up2date_config = '/etc/sysconfig/rhn/up2date'

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ class SwitchClnChannel(Actor):
2424
@run_on_cloudlinux
2525
def process(self):
2626
if not is_cln_package_channel_active():
27-
# CLOS-4056: CLN is no longer the package channel here (no-auth /
28-
# SWNG mode). Skipping the channel switch is correct - packages
29-
# come from cl-channel / cloudlinux9-baseos instead. The system
30-
# may still be CLN-registered for licensing; that is a separate
31-
# concern this actor does not need to manage.
27+
# CLOS-4056: CLN package channel is inactive, so skipping the channel switch
28+
# is correct - packages come from standard repositories instead.
29+
# Leapp manages those without custom actions through repomaps.
3230
api.current_logger().info(
3331
"CLN is not the active package channel; skipping channel switch"
3432
)
@@ -37,10 +35,9 @@ def process(self):
3735
try:
3836
cln_switch(target=int(get_target_major_version()))
3937
except CalledProcessError as e:
40-
# CLOS-4056: Do not inhibit. Even on systems that ARE using CLN
41-
# as the package channel, a transient CLN-server reachability
42-
# problem at FirstBoot (DNS/network not up yet) shouldn't block
43-
# the upgrade - the no-auth fallback repos still serve packages.
38+
# Do not inhibit. Even on systems that ARE using CLN as the package channel,
39+
# a transient CLN-server reachability problem at FirstBoot
40+
# shouldn't block the upgrade.
4441
reporting.create_report(
4542
[
4643
reporting.Title(

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ class UnpinClnMirror(Actor):
2222
def process(self):
2323
if not is_cln_package_channel_active():
2424
# CLOS-4056: pinclnmirror skipped its work for the same reason
25-
# (CLN is not the package channel here), so there is nothing
26-
# for us to unpin.
25+
# (CLN package channel inactive), so there is nothing for us to unpin.
2726
return
2827

2928
target_userspace = get_target_userspace_path()

repos/system_upgrade/cloudlinux/libraries/cln_detect.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
33
CLN has historically combined two concerns:
44
5-
1. **Registration / identity** - the system is registered with the CLN
6-
server (`/etc/sysconfig/rhn/systemid`, JWT token), used for licensing
7-
and inventory regardless of how packages are delivered.
5+
1. *Registration / identity* - the system is registered with the CLN
6+
server (`/etc/sysconfig/rhn/systemid`, JWT token), used for licensing
7+
regardless of how packages are delivered.
88
9-
2. **Package delivery** - the system pulls CloudLinux packages through
10-
the spacewalk DNF/YUM plugin against the CLN-side channel
11-
(`cloudlinux-x86_64-server-N`).
9+
2. *Package delivery* - the system pulls CloudLinux packages
10+
through the spacewalk DNF/YUM plugin against the
11+
CLN-side channel (`cloudlinux-x86_64-server-N`).
1212
13-
The no-auth (SWNG) transition decouples these. New CL8 and CL9 systems
14-
keep CLN **registration** but no longer use CLN as the **package
15-
channel** - packages come from the SWNG mirrorlist via
16-
`/etc/yum.repos.d/cl.repo` (`cl-channel`) instead. `rhn-client-tools
17-
>= 3.0.1` disables the spacewalk plugin to enforce this.
13+
The no-auth repository transition decouples these.
14+
New CL8 and CL9 systems keep CLN *registration*,
15+
but no longer use CLN as the *package channel* - packages come from the SWNG mirrorlist
16+
via `/etc/yum.repos.d/cl.repo` (`cl-channel`) instead.
17+
`rhn-client-tools >= 3.0.1` disables the spacewalk plugin to enforce this.
1818
1919
The CLN-touching actors in this repo only care about the second concern:
20-
they exist to make the CLN package channel work during ELevate. On
21-
systems where the channel has been switched off they should stand down
22-
even though registration may still be present and valid.
20+
they exist to make the CLN package channel work during ELevate.
21+
On systems where the channel has been switched off they should stand down,
22+
regardless of registration state.
2323
2424
CLOS-4056: gate those actors on `is_cln_package_channel_active()`.
2525
"""

0 commit comments

Comments
 (0)