Bug 2024978

Summary: Satellite upgrade to 6.10.1 fails with multiple rubygem-sinatra package dependency errors
Product: Red Hat Satellite Reporter: mithun kalyat <mkalyat>
Component: PackagingAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: high Docs Contact:
Priority: high    
Version: 6.10.0CC: ahumbe, ajambhul, alsouza, egolov, ehelms, gsulliva, jbhatia, jsenkyri, kkinge, ktordeur, ldelouw, pcreech, peter.vreman, pmendezh, rcavalca, saydas, vijsingh
Target Milestone: 6.11.0Keywords: PrioBumpGSS, Triaged, Upgrades
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: satellite-7.0.0-0.6.beta Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2043707 (view as bug list) Environment:
Last Closed: 2022-07-05 14:30:00 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:

Description mithun kalyat 2021-11-19 16:02:10 UTC
Description of problem:

Satellite 6.9 to 6.10 upgrade fails with 'rubygem-sinatra' dependency errors. This looks like if the Satellite was upgraded from 6.4 to the latest version, package upgrade failing on 'rubygem-sinatra' which has been installed from @rhel-7-server-satellite-6.4-rpms repository.

---snip----

---> Package satellite.noarch 0:6.9.7-1.el7sat will be updated
---> Package satellite.noarch 0:6.10.1-2.el7sat will be an update
---> Package satellite-cli.noarch 0:6.9.7-1.el7sat will be updated
---> Package satellite-cli.noarch 0:6.10.1-2.el7sat will be an update

----snip-----

Error: Package: 1:rubygem-sinatra-1.4.7-3.el7sat.noarch (@rhel-7-server-satellite-6.4-rpms)
           Requires: rubygem(rack-protection) >= 1.4.0
           Removing: rubygem-rack-protection-1.5.3-4.el7sat.noarch (@rhel-7-server-satellite-6.4-rpms)
               rubygem(rack-protection) = 1.5.3
           Obsoleted By: satellite-common-6.10.1-2.el7sat.noarch (rhel-7-server-satellite-6.10-rpms)
               Not found
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************

Error: Package: 1:rubygem-sinatra-1.4.7-3.el7sat.noarch (@rhel-7-server-satellite-6.4-rpms)
           Requires: rubygem(rack-protection) >= 1.4.0
           Removing: rubygem-rack-protection-1.5.3-4.el7sat.noarch (@rhel-7-server-satellite-6.4-rpms)
               rubygem(rack-protection) = 1.5.3
           Obsoleted By: satellite-common-6.10.1-2.el7sat.noarch (rhel-7-server-satellite-6.10-rpms)
               Not found

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

Satellite 6.10.1

Additional info:

The issue with 'tfm-rubygem' packages installed from @rhel-7-server-satellite-6.5-rpms has been fixed on Satellite 6.10.1 as per https://bugzilla.redhat.com/show_bug.cgi?id=1919194/show_bug.cgi?id=1919194

Comment 2 Eric Helms 2021-11-19 17:30:14 UTC
The rubygem-sinatra package can be removed (NOT the tfm-rubygem-sinatra package) to work around this issue.

Comment 8 Lukas Pramuk 2022-02-23 12:39:36 UTC
FailedQA.

@Satellite 7.0.0 Snap10
satellite-common-7.0.0-0.5.beta.el7sat.noarch

by following manual reproducer:


To check whether obsoleting rubygem-sinatra works in 7.0 upgrades I have to avoid upgrading from 6.10.3 as the fix is also present here (would obsolete rubygem sinatra already on 6.10.3)
Unfortunately 6.10.1 and 6.10.2 have broken dependencies due to missing obsolete of rubygem-sinatra I have to use 6.10.0 for upgrade to 7.0
Hopefully nothing else steps in....

1) On RHEL7 install rubygem-sinatra with dependecies (old rpms are in brew)

2) Install Satellite 6.10.0 (why this version? see above)

3) Upgrade to 7.0.0


Running Migration scripts to Satellite 7.0
================================================================================
Setup repositories:                                                   [SKIPPED]
--------------------------------------------------------------------------------
Unlock packages:                                                      [OK]
--------------------------------------------------------------------------------
Update package(s) :                                                   [FAIL]
Failed executing yum -y --disableplugin=foreman-protector update, exit status 1:
...

--> Finished Dependency Resolution
Error: Package: 1:rubygem-sinatra-1.4.7-3.el7sat.noarch (@/rubygem-sinatra-1.4.7-3.el7sat.noarch)
           Requires: rubygem(rack-protection) >= 1.4.0
           Removing: rubygem-rack-protection-1.5.3-4.el7sat.noarch (@/rubygem-rack-protection-1.5.3-4.el7sat.noarch)
               rubygem(rack-protection) = 1.5.3
           Obsoleted By: satellite-common-7.0.0-0.5.beta.el7sat.noarch (satellite)
               Not found

>>> the output shows that only rubygem-rack-protection is obsoleted but not rubygem-sinatra itself

# rpm -q --provides rubygem-sinatra
rubygem(sinatra) = 1.4.7
rubygem-sinatra = 1:1.4.7-3.el7sat

VS.

# rpm -q --obsoletes -p satellite-common-7.0.0-0.5.beta.el7sat.noarch.rpm | grep ^rubygem-sinatra
rubygem-sinatra < 1:1.4.7-3


>>> obsolete should be "rubygem-sinatra < 1:1.4.7-4" (release number +1) in order to obsolete rubygem-sinatra = 1:1.4.7-3.el7sat

Comment 9 Evgeni Golov 2022-02-23 13:50:44 UTC
damn, I could swear I used -4 here

Comment 10 Lukas Pramuk 2022-03-25 15:04:40 UTC
VERIFIED.

@Satellite 7.0.0 Snap14
satellite-common-7.0.0-0.7.beta.el7sat.noarch

by a manual reproducer described in comment#8:

1) On RHEL7 install rubygem-sinatra with dependecies (old rpms are in brew)

2) Install Satellite 6.10.0 (GA)

3) Upgrade to 7.0.0

Running Migration scripts to Satellite 7.0
================================================================================
Setup repositories:                                                   [SKIPPED]
--------------------------------------------------------------------------------
Unlock packages:                                                      [OK]
--------------------------------------------------------------------------------
Update package(s) :                                                   [OK]
--------------------------------------------------------------------------------
Procedures::Installer::Upgrade:                                       [OK]
--------------------------------------------------------------------------------
Execute upgrade:run rake task:                                        [OK]
--------------------------------------------------------------------------------

...
Upgrade finished.

# rpm -q --obsoletes satellite-common | grep ^rubygem-sinatra
rubygem-sinatra < 1:1.4.7-4

>>> satellite-common correctly obsoletes rubygem-sinatra and its dependecies

Comment 14 errata-xmlrpc 2022-07-05 14:30:00 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

Comment 15 Red Hat Bugzilla 2023-09-15 01:50:05 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days