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 2036187

Summary: self-upgrade fails with x.y should be greater than existing version x.y.z!
Product: Red Hat Satellite Reporter: Gaurav Talreja <gtalreja>
Component: Satellite MaintainAssignee: Amit Upadhye <aupadhye>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: apatel, aupadhye, egolov, kgaikwad
Target Milestone: 6.11.0Keywords: Triaged, Upgrades
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-1.0.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-05 14:31:28 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: 2026415    

Description Gaurav Talreja 2021-12-30 10:25:34 UTC
Description of problem:
foreman-maintain self-upgrade command added in BZ 2026415 for updating rubygem-foreman_maintain from next stream
When passing x.y version as target-version to self-upgrade it fails with comparing to satellite version, like for 6.10.1.1

# foreman-maintain self-upgrade --target-version 6.10
The target-version 6.10 should be greater than existing version 6.10.1.1!


Version-Release number of selected component (if applicable):
rubygem-foreman_maintain-1.0.1-1.el7sat.noarch


How reproducible:
always

Steps to Reproduce:
1. foreman-maintain self-upgrade --target-version 6.10

Actual results:
The target-version x.y should be greater than the existing version x.y.z!

Expected results:
If provide x.y version self-upgrade should pull from the latest x.y.z version 

Additional info:

Comment 1 Amit Upadhye 2022-01-17 13:24:51 UTC
Hello Gaurav,

The self-upgrade command is meant for major version upgrades only and for .z stream upgrades users should go by the existing workflow where self upgrade of foreman-maintain package happens automatically from .z stream repo.

The command help text mentions this as well,

      subcommand 'self-upgrade', 'Perform major version self upgrade',

https://github.com/theforeman/foreman_maintain/blob/894e362be977ef6db5bcb9db76198a864b759206/lib/foreman_maintain/cli.rb#L31

As per this should I close this bugzilla?

Regards,
Amit Upadhye.

Comment 2 Brad Buckingham 2022-01-25 20:03:31 UTC
Adding needinfo based upon comment 1.

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

Comment 7 Gaurav Talreja 2022-04-07 19:49:05 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.11/6.10

Observation:
Updated failure message will be displayed if the same or a previous Sat version passed as target-version, such as
"The target-version 6.11 should be greater than existing version 6.11.0,
and self-upgrade should be used for major version upgrades only!"

Comment 10 errata-xmlrpc 2022-07-05 14:31:28 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