Skip to content

CLOS-4056: leapp support for no-auth CloudLinux repository scheme#58

Open
prilr wants to merge 4 commits intocloudlinux:cloudlinuxfrom
prilr:CLOS-4056
Open

CLOS-4056: leapp support for no-auth CloudLinux repository scheme#58
prilr wants to merge 4 commits intocloudlinux:cloudlinuxfrom
prilr:CLOS-4056

Conversation

@prilr
Copy link
Copy Markdown
Collaborator

@prilr prilr commented Apr 30, 2026

Adds the leapp-side support for the no-auth (SWNG mirrorlist) repo scheme that is rolling out for CL8 and CL9.

After this lands, ELevate runs cleanly on a source system whose package channel is the cloudlinux-x86_64-server-$releasever mirrorlist (/etc/yum.repos.d/cl.repo, cl-channel) instead of the legacy CLN spacewalk-plugin channel.

CloudLinux-specific actors that assume CLN is the active package channel are now gated on a new is_cln_package_channel_active() helper.

The new helper deliberately distinguishes the package channel from CLN registration: /etc/sysconfig/rhn/systemid will persist on a no-auth host for licensing, but if the spacewalk plugin package is absent or disabled, packages no longer flow through CLN and the CLN-assuming actors must skip.

Companion changes to leapp-data add cloudlinux{8,9}-channel repomap entries and the matching [cloudlinux{8,9}-channel] stanzas to leapp_upgrade_repositories.repo.el{8,9}.

CL7 stays on the legacy spacewalk-plugin path - at the moment, only CL8/CL9 are migrating to no-auth in this round.

prilr added 4 commits April 27, 2026 12:06
Systems migrated to the no-auth (SWNG) scheme no longer have CLN as a
package source. Several CL-specific actors assumed CLN was always active
and either crashed on missing files or produced spurious inhibitors.

Add cln_detect.is_cln_configured() — True when the CLN plumbing is
present and not explicitly disabled (registration file exists + spacewalk
plugin installed + plugin enabled). Gate these actors on it:

- switch_cln_channel: skip the cln-switch-channel call on no-auth systems.
  Also downgrade the failed-switch inhibitor to a MEDIUM report, since a
  failure on a transitional system where CLN plumbing lingers but is no
  longer usable should not block the upgrade — CL9 packages come from
  cl-channel / cloudlinux9-baseos instead.
- pin_cln_mirror / unpin_cln_mirror: no-op on no-auth systems; also wrap
  the up2date update in try/except in pin_cln_mirror in case the file was
  not shipped on the target.
- check_rhn_version_override / reset_rhn_version_override: skip on no-auth
  systems and fall back cleanly when /etc/sysconfig/rhn/up2date is
  missing. reset_rhn_version_override: also fix a pre-existing bug where
  rebinding  inside the loop did not update config_data, so the
  reset was silently a no-op.

enable_yum_spacewalk_plugin is not touched here — CLOS-3960 has concurrent
work on it.
The first commit on this branch named the helper is_cln_configured()
and the actor comments said things like 'CLN is not configured here'.
That conflated two separate concerns and was misleading: CLN registration
is still in use on no-auth (SWNG) systems for licensing and inventory —
what the no-auth migration changes is only the package channel (the
spacewalk DNF plugin no longer delivers packages from a CLN channel).

Rename:

  is_cln_configured()  ->  is_cln_package_channel_active()

so the function name reflects what the actors actually need to gate on,
and rewrite its docstring + module header to spell out the package-channel
vs registration distinction.

Update each of the five actor comments accordingly. The detection logic
itself is unchanged — registration state plus a non-disabled spacewalk
plugin remains the right heuristic for 'CLN is delivering packages'.
Tests updated to match the new name and to phrase scenarios in terms of
the channel rather than 'CLN configured'.
The previous two commits introduced em-dashes (U+2014) in docstrings and
inline comments. The upstream make lint target now greps for any
non-ASCII byte (commit 92aee84) because Python 2.7 source files reject
non-ASCII without an encoding declaration, and the leapp framework still
supports running on 2.7 in places. Replace each em-dash with an ASCII
hyphen so the files lint clean against that gate.
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.

1 participant