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 2078828 - Improvements on foreman-maintain's self-upgrade mechanism
Summary: Improvements on foreman-maintain's self-upgrade mechanism
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.10.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.10.6
Assignee: Amit Upadhye
QA Contact: Gaurav Talreja
URL:
Whiteboard:
Depends On: 2072530
Blocks: 2026415
TreeView+ depends on / blocked
 
Reported: 2022-04-26 10:09 UTC by Amit Upadhye
Modified: 2022-10-27 08:31 UTC (History)
5 users (show)

Fixed In Version: rubygem-foreman_maintain-0.8.30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2072530
Environment:
Last Closed: 2022-05-31 16:37:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33620 0 Normal Closed RFE: Add command for upgrading foreman-maintain to next major version 2022-04-26 10:11:39 UTC
Red Hat Product Errata RHBA-2022:4851 0 None None None 2022-05-31 16:37:29 UTC

Description Amit Upadhye 2022-04-26 10:09:55 UTC
+++ This bug was initially created as a clone of Bug #2072530 +++

Description of problem:

The foreman-maintain's self-upgrade command needs improvement as below,

1. Allow only upgrade to next .Y release
2. Capitalize the ENV variable
3. Provide an option to pass maintenance repository label in case of disconnected or testing environments. This is additional to existing way of exporting 'MAINTENANCE_REPO_LABEL' variable.
4. Unify the ENV var and option name.

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

6.11 and 6.10


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Amit Upadhye on 2022-04-06 18:57:54 IST ---

With these changes workflow changes as below,

1. The command changes to,

# satellite-maintain self-upgrade

There is no target version as its calculated considering the installed version.

2. There is no --target-version option hence no need to pass the version to the command

3. The ENV var changed to 'MAINTENANCE_REPO_LABEL'

4. Have additional optional option 'maintenance-repo-label',

# bin/foreman-maintain self-upgrade --help
Usage:
    foreman-maintain self-upgrade [OPTIONS]

Options:
    --maintenance-repo-label REPOSITORY_LABEL    Repository label from which packages should be updated.This can be used when standard CDN repositories are unavailable.
    -h, --help                                   print help

Comment 2 Gaurav Talreja 2022-05-16 13:28:09 UTC
Verified.

Tested on Satellite 6.10.6 Snap 1.0
Version: rubygem-foreman_maintain-0.8.30-1.el7sat.noarch

Steps:
1. # foreman-maintain self-upgrade
2. Add custom_repo for 6.11 with the label 'sat-maintain'
3. # MAINTENANCE_REPO_LABEL='sat-maintain' foreman-maintain self-upgrade 
4. # foreman-maintain self-upgrade --maintenance-repo-label sat-maintain

Observation, 
Step1, tries only to enable the 6.11 repo (N+1 only) and updates package(s) satellite-maintain, rubygem-foreman_maintain.
No target-version option is required now, and as the N+1 repo won't be available till 6.11 GA, here self-upgrade passes and hit BZ 2060396, due to some code limitations, Amit was unable to cherrypick BZ 2060396 for 6.10.z.

Step3 or Step4, For disconnected/testing environments it tries to enable custom repo labeled from MAINTENANCE_REPO_LABEL env var or using option "--maintenance-repo-label" and updates package(s) satellite-maintain, rubygem-foreman_maintain.

Comment 5 errata-xmlrpc 2022-05-31 16:37:24 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 (Satellite Maintenance 6.10.6 Async Bug Fix Update), 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/RHBA-2022:4851


Note You need to log in before you can comment on or make changes to this bug.