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 1699534

Summary: Upgrade from 6.2.16 > 6.3 fails due to bad packaging around tfm-rubygem-qpid_messaging
Product: Red Hat Satellite Reporter: Lukas Pramuk <lpramuk>
Component: PackagingAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: urgent Docs Contact:
Priority: high    
Version: 6.2.15CC: egolov, ehelms, hshukla, mmccune, tasander, zhunting
Target Milestone: ReleasedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: tfm-rubygem-qpid_messaging-1.36.0-9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1700053 1700054 (view as bug list) Environment:
Last Closed: 2019-05-14 19:58:03 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 Lukas Pramuk 2019-04-13 14:58:41 UTC
Description of problem:

With 6.2.16 we did release rpms of newer versions that we have in 6.3
Especially with tfm-rubygem-qpid_messaging rpm it has severe implication, newer 6.2 rpm requires ruby22 while correct and older 6.3 one requires ruby23

You end up stuck in the middle with some mixture of ryby22 and ruby23 gems.
foreman-rake is then obviously failing.

List of non-upgradeble rpms:

tfm-rubygem-qpid_messaging.x86_64  1.36.0-1.el7sat   rhel-7-server-satellite-6.3-rpms (> ruby23)
tfm-rubygem-qpid_messaging.x86_64  1.36.0-6.el7sat   rhel-7-server-satellite-6.2-rpms (> ruby22)

python-qpid-proton.x86_64          0.16.0-11.el7     rhel-7-server-satellite-6.3-rpms 
python-qpid-proton.x86_64          0.16.0-12.el7sat  rhel-7-server-satellite-6.2-rpms 

qpid-proton-c.x86_64               0.16.0-11.el7     rhel-7-server-satellite-6.3-rpms 
qpid-proton-c.x86_64               0.16.0-12.el7sat  rhel-7-server-satellite-6.2-rpms 

The root cause is that we usually miss to bump rpm versions between major releases (6.2 and 6.3 and so on) and rpm of the same version is GA'ed in next major release. Fixing along z-stream (6.2.16) by increasing release number only (-6.el7sat) will cause immediate packaging problems during upgrades.

This results into induced cascaded version bumps for all major versions released after 6.2  before we stand now as this has to be resolved in 6.3.z and then in 6.4.z and 6.5.0 (fixing preferably in reverse order 6.4.z and then 6.3.z, otherwise fix for 6.3.z would break upgrades to 6.4)

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

How reproducible:
always

Steps to Reproduce:
1. Upgrade 6.2.16 to 6.3 
# subscription-manager repos --disable rhel-7-server-satellite-6.2-rpms

# subscription-manager repos --enable rhel-7-server-satellite-6.3-rpms

# yum update

# satellite-installer --upgrade
...

Upgrade Step: migrate_foreman...
rake aborted!
Gem loading error: libruby.so.2.2: cannot open shared object file: No such file or directory - /opt/theforeman/tfm/root/usr/lib64/gems/ruby/qpid_messaging-1.36.0/cqpid.so
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/output.rb:13:in `strict_err'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:46:in `rescue in block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:39:in `block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in `block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `system_require'
/usr/share/foreman/config/application.rb:16:in `<top (required)>'
/usr/share/foreman/Rakefile:1:in `<top (required)>'
LoadError: libruby.so.2.2: cannot open shared object file: No such file or directory - /opt/theforeman/tfm/root/usr/lib64/gems/ruby/qpid_messaging-1.36.0/cqpid.so

...

Actual results:
upgrade fails due to bad packaging practice 

Expected results:
upgrade succeeds,  packaging practice avoiding future problems

Comment 3 Mike McCune 2019-04-14 22:05:48 UTC
Draft Plan to resolve this:

6.3:

- Build + ship new version of tfm-rubygem-qpid_messaging-1.36.0-7.el7sat.x86_64 that just bumps the version
- Upgrade to python-qpid-proton-0.16.0-12.el7sat.x86_64

6.4:

 - Build + ship new version of tfm-rubygem-qpid_messaging-1.36.0-7.el7sat.x86_64 that just bumps the version
 - Upgrade to python-qpid-proton-0.16.0-12.el7sat.x86_64

Comment 5 Evgeni Golov 2019-04-15 10:41:33 UTC
*** Bug 1699833 has been marked as a duplicate of this bug. ***

Comment 6 Lukas Pramuk 2019-04-21 12:53:05 UTC
VERIFIED.

@satellite-6.5.0-11.el7sat.noarch
tfm-rubygem-qpid_messaging-1.36.0-9.el7sat.x86_64

by the following manual reproducer:

1) Have latest Sat6.4 with latest async errata installed (tfm-rubygem-qpid_messaging)

# rpm -q satellite tfm-rubygem-qpid_messaging
satellite-6.4.2.2-1.el7sat.noarch
tfm-rubygem-qpid_messaging-1.36.0-8.el7sat.x86_64

2) Upgrade to 6.5

3) Check that tfm-rubygem-qpid_messaging package gets installed out of satellite (=6.5) repo 

# yum list tfm-rubygem-qpid_messaging
Installed Packages
tfm-rubygem-qpid_messaging.x86_64       1.36.0-9.el7sat     @satellite

>>> upgrade 6.4 > 6.5 was successful, tfm-rubygem-qpid_messaging is installed from 6.5 repo (replacing 6.4 version)

Comment 7 Bryan Kearney 2019-05-14 19:58:03 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, 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-2019:1222