Commit ed85029
CLOS-4056 follow-up: target_userspace_creator: tolerate missing dnf-plugin-spacewalk config
When the target userspace is built from no-auth-aware repos
(rhn-client-tools >= 3.0.1, which Obsoletes dnf-plugin-spacewalk on CL8/9
per CLOS-4056), /etc/dnf/plugins/spacewalk.conf is absent in
/var/lib/leapp/elNuserspace/. The unconditional `open(spacewalk_conf, 'r')`
inside `if os.path.isdir('/etc/sysconfig/rhn')` then raises
IOError: [Errno 2] No such file or directory: '/var/lib/leapp/el8userspace/etc/dnf/plugins/spacewalk.conf'
and target_userspace_creator crashes with exit code 1, blocking preupgrade
on every CL7+CLN -> CL8+no_auth transition where the new RC packages reach
the target.
Surfaced during CLOS-4056 verification (elevate-qa Run #3 build #40 with
BS_BUILDS_TARGET delivery wired up correctly via leapp_upgrade_repositories.repo
late-append). The outer /etc/sysconfig/rhn check is correct (CLN registration
may persist on no-auth for licensing), but the inner file presence is no
longer guaranteed - guard it with an explicit os.path.isfile check.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent fcecc76 commit ed85029
1 file changed
Lines changed: 13 additions & 3 deletions
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
684 | | - | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
685 | 695 | | |
686 | | - | |
| 696 | + | |
687 | 697 | | |
688 | 698 | | |
689 | 699 | | |
690 | 700 | | |
691 | 701 | | |
692 | 702 | | |
693 | | - | |
| 703 | + | |
694 | 704 | | |
695 | 705 | | |
696 | 706 | | |
| |||
0 commit comments