Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1936872

Summary: satellite-maintain upgrade check does not compare enabled repos for satellite or capsule with installed packages
Product: Red Hat Satellite Reporter: Stefan Nemeth <snemeth>
Component: Satellite MaintainAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Griffin Sullivan <gsulliva>
Severity: medium Docs Contact:
Priority: high    
Version: 6.8.0CC: apatel, aupadhye, ehelms, ekohlvan, jangerrit.kootstra, jpathan, kgaikwad
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-03-28 19:36:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1957813    

Description Stefan Nemeth 2021-03-09 11:45:58 UTC
Description of problem:

satellite-maintain upgrade check --target-version 6.8.z

step  Checking repositories enabled on the system  

does not compare enabled repository, capsule or satellite to actually installed packages. If capsule repo is enabled on satellite, instead of satellite repository, installer successfully continues and fails later on 

Error: Important rpm package satellite is not installed!
Install satellite rpm to ensure system consistency.


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

How reproducible:
100%^

Steps to Reproduce:
1. on satellite server 
#subscription-manager repos --disable='rhel-7-server-satellite-6.8-rpms'
2. #subscription-manager repos --enable='rhel-7-server-satellite-capsule-6.8-rpms'
3.foreman-maintain upgrade check --target-version 6.8.z

Actual results:

satellite-maintain sees capsule repo as legitimate if it is enabled on satellite and vice versa leading to upgrade failure on

Error: Important rpm package satellite is not installed!
Install satellite rpm to ensure system consistency.

Expected results:

check for installed packages (satellite.noarch, satellite-capsule.noarch) before verifying the repositories

Additional info:

Comment 1 ir. Jan Gerrit Kootstra 2021-05-26 11:06:56 UTC
Encounter this bug when trying to upgrade a capsule from 6.8.6 to 6.9.2

Comment 4 Amit Upadhye 2022-05-05 14:42:18 UTC
Hello,

The satellite-maintain enables the repository as per the name of the package(satellite/capsule) before doing the upgrade, and repository-validate checks if required repositories are available on system or not,

https://github.com/theforeman/foreman_maintain/blob/master/lib/foreman_maintain/concerns/downstream.rb#L95

To avoid the situation where installed system as per scenario does not match with package(satellite/capsule) there is 'validate_downstream_packages'

https://github.com/theforeman/foreman_maintain/blob/master/lib/foreman_maintain/concerns/primary_checks.rb

and its being called already prior to doing any pre_upgrade_checks,

https://github.com/theforeman/foreman_maintain/blob/master/lib/foreman_maintain/cli/upgrade_command.rb#L71
https://github.com/theforeman/foreman_maintain/blob/master/lib/foreman_maintain/cli/upgrade_command.rb#L91

Considering satellite-maintain won't fall in situation where it will let the upgrade complete with invalid repository, I think this bugzilla should be closed?

_
Amit Upadhye.

Comment 5 ir. Jan Gerrit Kootstra 2022-05-06 06:23:50 UTC
Hi Amit,

Please explain how this early stage check works, for it has failed in our situation once for a capsule where by accident some former colleague had activated a satellite repo on a capsule and the pre check did not give a warning or error message to fix this issue.

So we got a mix of capsule and satellite server packages on the machine. This broke the capsule.

I ask you not to close the bugzilla, until it is clear the issue described in this bugzilla is fixed.

Regards,


Jan Gerrit Kootstra

Comment 7 Eric Helms 2024-03-28 19:36:25 UTC
This was reported on an older version where we have since put in more control over the repositories being enabled. Additionally, this check doesn't help for disconnected, given this I am opting to close.

Comment 8 ir. Jan Gerrit Kootstra 2024-03-28 20:05:47 UTC
Hi Eric,


This was reported for a connected Satellite 6.9 on RHEL 7, with Capsules 6.9 on RHEL 7 registered to the Satellite.
Still like you mention, it is a very old case that we have not encountered since Satellite 6.9 and we are running Satellite 6.14 on RHEL 8.

I am ok with a closure.


Regards,


Jan Gerrit

Comment 9 Red Hat Bugzilla 2024-10-13 04:25:02 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days