Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2165490 - "dnf module enable pki-core" in installer sometimes fails during leapp upgrade
Summary: "dnf module enable pki-core" in installer sometimes fails during leapp upgrade
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-30 09:25 UTC by Evgeni Golov
Modified: 2024-05-29 20:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-29 20:55:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-15296 0 None None None 2023-01-30 14:09:33 UTC

Description Evgeni Golov 2023-01-30 09:25:38 UTC
Description of problem:
To prevent some (old) issues with modules, our installer does a "dnf module enable pki-core" early at startup. Given we're operating in a module that has a dependency on pki-core, this is effectively a noop.

However, there is a special case when we do a leapp upgrade from RHEL7 to RHEL8. All repos, packages and modules are correctly handled by leapp in the initramfs phase, so when the system reboots into the new RHEL8 environment to run the installer and finalize _NO_ new packages are required, yet the installer will still run the module enable, as it doesn't know any better. Yet the module might be currently not be available as leapp did not re-enable all repositories yet (it also has a first-boot action to do so).

We cannot chain the installer execution *after* leapp has enabled the repos (there is no signal emitted for that), but we can easily just drop the enablement (as it has been done upstream in https://github.com/theforeman/foreman-installer/pull/786 once we had the "proper" modularity setup in place) as we don't need any repositories/modules available *at this time*

Version-Release number of selected component (if applicable):
6.11.4

How reproducible:
50%

Steps to Reproduce:
1. sat 6.11 on el7
2. try to upgrade to el8 using cdn repos (offline repos won't do as they are "always" enabled)
3. watch the logs

Actual results:
Sometimes, repo enablement happens after the installer, resulting in errors:

2023-01-27 07:54:54.495 DEBUG    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: External command has started: ['foreman-installer', '--disable-system-checks']
2023-01-27 07:54:58.648 DEBUG    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: ESC[34m2023-01-27 07:54:58ESC[0m [ESC[32mNOTICEESC[0m] [ESC[36mrootESC[0m] Loading installer configuration. This will take some time.
2023-01-27 07:55:06.118 DEBUG    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: ESC[34m2023-01-27 07:55:06ESC[0m [ESC[32mNOTICEESC[0m] [ESC[36mrootESC[0m] Running installer with log based terminal output at level NOTICE.
2023-01-27 07:55:06.141 DEBUG    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: ESC[34m2023-01-27 07:55:06ESC[0m [ESC[32mNOTICEESC[0m] [ESC[36mrootESC[0m] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2023-01-27 07:55:12.346 DEBUG    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: ESC[1mESC[36mPackage versions are locked. Continuing with unlock.ESC[0m
2023-01-27 07:55:13.939 DEBUG    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: ESC[34m2023-01-27 07:55:13ESC[0m [ESC[33mWARN  ESC[0m] [ESC[36mpreESC[0m] Skipping system checks.
2023-01-27 07:55:13.948 DEBUG    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: ESC[34m2023-01-27 07:55:13ESC[0m [ESC[33mWARN  ESC[0m] [ESC[36mpreESC[0m] Skipping system checks.
2023-01-27 07:55:18.967 DEBUG    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: ESC[34m2023-01-27 07:55:18ESC[0m [ESC[31mERROR ESC[0m] [ESC[36mrootESC[0m] dnf module enable pki-core --assumeyes failed! Check the output for error!
2023-01-27 07:55:18.978 DEBUG    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: Command ['foreman-installer', '--disable-system-checks'] failed with exit code 1.
2023-01-27 07:55:18.989 DEBUG    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: External command has finished: ['foreman-installer', '--disable-system-checks']
2023-01-27 07:55:18.995 ERROR    PID: 6763 leapp.workflow.FirstBoot.satellite_upgrader: Could not run the installer, please inspect the logs in /var/log/foreman-installer!
2023-01-27 07:55:19.18  INFO     PID: 6214 leapp.workflow.FirstBoot: Executing actor enable_rhsm_target_repos
2023-01-27 07:55:19.221 DEBUG    PID: 7511 leapp.workflow.FirstBoot.enable_rhsm_target_repos: External command has started: ['subscription-manager', 'release', '--set', '8.6']
2023-01-27 07:55:20.797 DEBUG    PID: 7511 leapp.workflow.FirstBoot.enable_rhsm_target_repos: Release set to: 8.6
2023-01-27 07:55:20.864 DEBUG    PID: 7511 leapp.workflow.FirstBoot.enable_rhsm_target_repos: External command has finished: ['subscription-manager', 'release', '--set', '8.6']
2023-01-27 07:55:20.871 DEBUG    PID: 7511 leapp.workflow.FirstBoot.enable_rhsm_target_repos: External command has started: ['subscription-manager', 'repos', '--enable', 'satellite-maintenance-6.11-for-rhel-8-x86_64-rpms', '--enable', 'rhel-8-for-x86_64-baseos-rpms', '--enable', 'rhel-8-for-x86_64-appstream-rpms', '--enable', 'rhel-8-for-x86_64-highavailability-rpms', '--enable', 'satellite-6.11-for-rhel-8-x86_64-rpms']
2023-01-27 07:55:58.479 DEBUG    PID: 7511 leapp.workflow.FirstBoot.enable_rhsm_target_repos: Repository 'satellite-maintenance-6.11-for-rhel-8-x86_64-rpms' is enabled for this system.
2023-01-27 07:55:58.491 DEBUG    PID: 7511 leapp.workflow.FirstBoot.enable_rhsm_target_repos: Repository 'rhel-8-for-x86_64-baseos-rpms' is enabled for this system.
2023-01-27 07:55:58.498 DEBUG    PID: 7511 leapp.workflow.FirstBoot.enable_rhsm_target_repos: Repository 'rhel-8-for-x86_64-appstream-rpms' is enabled for this system.
2023-01-27 07:55:58.504 DEBUG    PID: 7511 leapp.workflow.FirstBoot.enable_rhsm_target_repos: Repository 'rhel-8-for-x86_64-highavailability-rpms' is enabled for this system.
2023-01-27 07:55:58.511 DEBUG    PID: 7511 leapp.workflow.FirstBoot.enable_rhsm_target_repos: Repository 'satellite-6.11-for-rhel-8-x86_64-rpms' is enabled for this system.
2023-01-27 07:55:58.610 DEBUG    PID: 7511 leapp.workflow.FirstBoot.enable_rhsm_target_repos: External command has finished: ['subscription-manager', 'repos', '--enable', 'satellite-maintenance-6.11-for-rhel-8-x86_64-rpms', '--enable', 'rhel-8-for-x86_64-baseos-rpms', '--enable', 'rhel-8-for-x86_64-appstream-rpms', '--enable', 'rhel-8-for-x86_64-highavailability-rpms', '--enable', 'satellite-6.11-for-rhel-8-x86_64-rpms']



Expected results:
No error

Additional info:
Workaround is to execute any steps done by leapp on first boot for Satellite manually.

Comment 4 Brad Buckingham 2024-05-29 20:55:01 UTC
The issue described only applied to Satellite 6.11.  Since that release has reached EOL, I am closing the bugzilla.  If there are any concerns with this action, please reach out to me.  Thanks!


Note You need to log in before you can comment on or make changes to this bug.