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.
Running "satellite-maintain self-upgrade" on a Satellite\Capsule 6.11.1.1 fails with error "Error: 'satellite-maintenance-6.11.2-for-rhel-8-x86_64-rpms' does not match a valid repository ID"
Description of problem:
The goal of using "satellite-maintain self-upgrade" is usually for performing a major version upgrade i.e. 6.10 to 6.11 , but when we execute this command on Satellite\Capsule 6.11.1.1 , It tries to enable the maintenance-rpms repo with a wrong version.
Version-Release number of selected component (if applicable):
Satellite\Capsule 6.11.1.1
How reproducible:
100%
Steps to Reproduce:
1. Install the latest most version of Satellite 6.11 and ensure we are on 6.11.1.1-1
2. Run "satellite-maintain self-upgrade"
Actual results:
On RHEL 7:
~~~
Failed executing yum --enablerepo=rhel-7-server-rpms --enablerepo=rhel-server-rhscl-7-rpms --enablerepo=rhel-7-server-satellite-maintenance-6.11.2-rpms -y --disableplugin=foreman-protector update satellite-maintain rubygem-foreman_maintain, exit status 1:
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-
: disabled-repos, subscription-manager
Error getting repository data for rhel-7-server-satellite-maintenance-6.11.2-rpms, repository not found
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager
~~~
On RHEL 8:
~~~
/ Enabling repositories [FAIL]
Failed executing subscription-manager repos --enable=rhel-8-for-x86_64-baseos-rpms --enable=rhel-8-for-x86_64-appstream-rpms --enable=satellite-maintenance-6.11.2-for-rhel-8-x86_64-rpms, exit status 1:
Error: 'satellite-maintenance-6.11.2-for-rhel-8-x86_64-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.
Repository 'rhel-8-for-x86_64-baseos-rpms' is enabled for this system.
Repository 'rhel-8-for-x86_64-appstream-rpms' is enabled for this system.
--------------------------------------------------------------------------------
~~~
As we can see, it tries to enable 6.11.2 instead of 6.12 which is not correct.
Expected results:
If the next major version ( 6.12 ) is not available, the command should immediately stop it's execution.
the next major version ( 6.12 ) is available then the command should try to enable the right maintenance repo for 6.12
Additional info:
From a small testing, the main root cause seems to be the way 6.11.1.1 and 6.11.1 is being processed by the .bump method ruby.
# foreman-rake console
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
Loading production environment (Rails 6.0.4.7)
irb(main):002:0> Gem::Version.new('6.11.1.1').bump
=> #<Gem::Version "6.11.2">
irb(main):003:0> Gem::Version.new('6.11.1.0').bump
=> #<Gem::Version "6.11.2">
irb(main):004:0> Gem::Version.new('6.11.1').bump
=> #<Gem::Version "6.12">
irb(main):005:0> Gem::Version.new('6.11.0').bump
=> #<Gem::Version "6.12">
irb(main):006:0> Gem::Version.new('6.11').bump
=> #<Gem::Version "7">
irb(main):007:0> exit
Hi,
Since we don't have 6.12.0.x at the moment, it's not possible to test it on 6.12. Alternatively, I patched 6.11.1.1 with this fix and got below error, is this expected or should the issue be moved back to ASSIGNED?
# foreman-maintain self-upgrade
undefined method `bump' for "6.11":String
Thanks,
Gaurav
Verified
Tested on Satellite 6.12.0 Snap 14.0
Version: rubygem-foreman_maintain-1.1.8-1.el8sat.noarch
Steps:
Applied this fix on 6.11.1.1/6.12.0 and ran "foreman-maintain self-upgrade"
Observation
For 6.11.1.1, self-upgrade enables 6.12 maintenance repo and for 6.12.0, self-upgrade enables 6.13 maintenance repo
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 (Important: Satellite 6.12 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:8506
Description of problem: The goal of using "satellite-maintain self-upgrade" is usually for performing a major version upgrade i.e. 6.10 to 6.11 , but when we execute this command on Satellite\Capsule 6.11.1.1 , It tries to enable the maintenance-rpms repo with a wrong version. Version-Release number of selected component (if applicable): Satellite\Capsule 6.11.1.1 How reproducible: 100% Steps to Reproduce: 1. Install the latest most version of Satellite 6.11 and ensure we are on 6.11.1.1-1 2. Run "satellite-maintain self-upgrade" Actual results: On RHEL 7: ~~~ Failed executing yum --enablerepo=rhel-7-server-rpms --enablerepo=rhel-server-rhscl-7-rpms --enablerepo=rhel-7-server-satellite-maintenance-6.11.2-rpms -y --disableplugin=foreman-protector update satellite-maintain rubygem-foreman_maintain, exit status 1: Loaded plugins: enabled_repos_upload, package_upload, product-id, search- : disabled-repos, subscription-manager Error getting repository data for rhel-7-server-satellite-maintenance-6.11.2-rpms, repository not found Uploading Enabled Repositories Report Loaded plugins: product-id, subscription-manager ~~~ On RHEL 8: ~~~ / Enabling repositories [FAIL] Failed executing subscription-manager repos --enable=rhel-8-for-x86_64-baseos-rpms --enable=rhel-8-for-x86_64-appstream-rpms --enable=satellite-maintenance-6.11.2-for-rhel-8-x86_64-rpms, exit status 1: Error: 'satellite-maintenance-6.11.2-for-rhel-8-x86_64-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. Repository 'rhel-8-for-x86_64-baseos-rpms' is enabled for this system. Repository 'rhel-8-for-x86_64-appstream-rpms' is enabled for this system. -------------------------------------------------------------------------------- ~~~ As we can see, it tries to enable 6.11.2 instead of 6.12 which is not correct. Expected results: If the next major version ( 6.12 ) is not available, the command should immediately stop it's execution. the next major version ( 6.12 ) is available then the command should try to enable the right maintenance repo for 6.12 Additional info: From a small testing, the main root cause seems to be the way 6.11.1.1 and 6.11.1 is being processed by the .bump method ruby. # foreman-rake console API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache. Loading production environment (Rails 6.0.4.7) irb(main):002:0> Gem::Version.new('6.11.1.1').bump => #<Gem::Version "6.11.2"> irb(main):003:0> Gem::Version.new('6.11.1.0').bump => #<Gem::Version "6.11.2"> irb(main):004:0> Gem::Version.new('6.11.1').bump => #<Gem::Version "6.12"> irb(main):005:0> Gem::Version.new('6.11.0').bump => #<Gem::Version "6.12"> irb(main):006:0> Gem::Version.new('6.11').bump => #<Gem::Version "7"> irb(main):007:0> exit