Description of problem: satellite-maintain self-upgrade command added in BZ 2026415 for updating rubygem-foreman_maintain from next stream Here satellite-maintain self-upgrade passes even if the next major version maintenance repository isn't available in CDN Version-Release number of selected component (if applicable): rubygem-foreman_maintain.noarch 1:1.0.3-1.el7sat How reproducible: Always Steps to Reproduce: 1. foreman-maintain self-upgrade --target-version 7.0 2. or try any 7.x, # foreman-maintain self-upgrade --target-version 7.8 3. Actual results: self-upgrade pass even if repo not available Expected results: self-upgrade should fail to enable the next version repo if not available in CDN Additional info: In self-upgrade, we use yum-config-manager for el7 which returns nothing if fail to enable repo D, [2022-03-03 07:34:49-0500 #38785] DEBUG -- : Running command yum-config-manager --disable foreman-maintain,rhel-7-server-ansible-2.9-rpms,rhel-7-server-rpms,rhel-7-server-satellite-maintenance-6-rpms,rhel-server-rhscl-7-rpms,sat-maintain,sat6,sat6tools7 with stdin nil D, [2022-03-03 07:34:53-0500 #38785] DEBUG -- : Running command yum-config-manager --enable rhel-7-server-satellite-maintenance-7.0-rpms with stdin nil D, [2022-03-03 07:35:27-0500 #38785] DEBUG -- : Running command yum-config-manager --enable foreman-maintain,rhel-7-server-ansible-2.9-rpms,rhel-7-server-rpms,rhel-7-server-satellite-maintenance-6-rpms,rhel-server-rhscl-7-rpms,sat-maintain,sat6,sat6tools7,rhel-7-server-satellite-maintenance-6-rpms with stdin nil
Upstream bug assigned to aupadhye
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33620 has been resolved.
Verified. Tested on Satellite 6.11.0 Snap 15.0 Version: rubygem-foreman_maintain-1.0.6-1.el7sat.noarch Steps: 1. # foreman-maintain self-upgrade --target-version 6.12 Observation: Earlier yum-config-manager don't return anything, so it always passed when repo isn't available in CDN, now we using subscription-manager instead to enable repos that return the below error when repo isn't available. -------------------------------------------------------------------------------- Enable repositories: | Enabling repositories [FAIL] Failed executing subscription-manager repos --enable=rhel-7-server-satellite-maintenance-6.12-rpms, exit status 1: This system has no repositories available through subscriptions. --------------------------------------------------------------------------------
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5498