Skip to content

Commit a0a86ee

Browse files
prilrclaude
andcommitted
EnableYumSpacewalkPlugin: rename config -> CONFIG_PATH (reserved name)
The Actor base class in leapp framework 0.18+ runs self.config = retrieve_config(self.config_schemas) in __init__, which clobbers any class-level `config` attribute the actor defined. Our class-level `config = '/etc/dnf/plugins/spacewalk.conf'` was silently turned into the runtime config dict, so the FirstBoot phase crashed with `TypeError: stat: path should be string, ..., not dict` on every CL upgrade (CLOS-3960 introduced the assignment, but the rename to DEFAULT_CONFIG_PATH in CLOS-3960's library didn't touch the actor's class attribute name). Rename to CONFIG_PATH so the framework leaves it alone. _enable_plugin() already silently no-ops when the file is missing, so no_auth systems (where the spacewalk plugin is removed by rhn-client-tools >= 3.0.1) keep skipping cleanly. Verified live on a CL9 machine: patched actor loads, process() reaches _enable_plugin with the string path, and silently returns False/None when the plugin config is absent. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 67329c6 commit a0a86ee

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • repos/system_upgrade/cloudlinux/actors/enableyumspacewalkplugin

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ class EnableYumSpacewalkPlugin(Actor):
1111
consumes = ()
1212
produces = (Report,)
1313
tags = (FirstBootPhaseTag, IPUWorkflowTag)
14-
config = enableyumspacewalkplugin.DEFAULT_CONFIG_PATH
14+
15+
CONFIG_PATH = enableyumspacewalkplugin.DEFAULT_CONFIG_PATH
1516

1617
@run_on_cloudlinux
1718
def process(self):
1819
_, title = enableyumspacewalkplugin._enable_plugin(
19-
self.config, enableyumspacewalkplugin.ParserClass, self.log
20+
self.CONFIG_PATH, enableyumspacewalkplugin.ParserClass, self.log
2021
)
2122
if title:
2223
reporting.create_report([
2324
reporting.Title(title),
24-
reporting.Summary("DNF spacewalk plugin must be enabled for CLN channels. Config path: " + self.config),
25+
reporting.Summary("DNF spacewalk plugin must be enabled for CLN channels. Config path: " + self.CONFIG_PATH),
2526
reporting.Severity(reporting.Severity.MEDIUM),
2627
reporting.Groups([reporting.Groups.SANITY])
2728
])

0 commit comments

Comments
 (0)