Bug 2060396 - satellite-maintain self-upgrade passes even if the next major version maintenance repository isn't available
Summary: satellite-maintain self-upgrade passes even if the next major version mainten...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Maintain
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.11.0
Assignee: Amit Upadhye
QA Contact: Gaurav Talreja
URL:
Whiteboard:
Depends On:
Blocks: 2026415
TreeView+ depends on / blocked
 
Reported: 2022-03-03 12:40 UTC by Gaurav Talreja
Modified: 2022-07-05 14:34 UTC (History)
3 users (show)

Fixed In Version: rubygem-foreman_maintain-1.0.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:34:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33620 0 Normal Closed RFE: Add command for upgrading foreman-maintain to next major version 2022-03-08 13:57:09 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:34:15 UTC

Description Gaurav Talreja 2022-03-03 12:40:59 UTC
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

Comment 1 Bryan Kearney 2022-03-08 16:05:41 UTC
Upstream bug assigned to aupadhye

Comment 2 Bryan Kearney 2022-03-08 16:05:43 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33620 has been resolved.

Comment 5 Gaurav Talreja 2022-04-08 11:11:57 UTC
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.
--------------------------------------------------------------------------------

Comment 8 errata-xmlrpc 2022-07-05 14:34:01 UTC
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


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