Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-15296

"dnf module enable pki-core" in installer sometimes fails during leapp upgrade

XMLWordPrintable

    • Moderate
    • None

      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.

            jira-bugzilla-migration RH Bugzilla Integration
            jira-bugzilla-migration RH Bugzilla Integration
            RH Bugzilla Integration RH Bugzilla Integration
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: