Bug 1268283 - [RFE] host unification: Add script to be run on previous version to detect systems that would need to be deleted on upgrade
[RFE] host unification: Add script to be run on previous version to detect sy...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.1.0
Unspecified Unspecified
high Severity high (vote)
: 6.1.9
: --
Assigned To: Justin Sherrill
Og Maciel
http://projects.theforeman.org/issues...
: FutureFeature, Triaged
Depends On:
Blocks: 1315269 1337938
  Show dependency treegraph
 
Reported: 2015-10-02 08:22 EDT by Justin Sherrill
Modified: 2017-02-23 14:45 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 03:13:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 12038 None None None 2016-04-22 12:19 EDT

  None (edit)
Description Justin Sherrill 2015-10-02 08:22:29 EDT
So users will know how to correct data before the upgrade.
Comment 1 Justin Sherrill 2015-10-02 08:22:31 EDT
Created from redmine issue http://projects.theforeman.org/issues/12038
Comment 4 Bryan Kearney 2016-05-03 16:09:46 EDT
Upstream bug component is Content Management
Comment 5 Bryan Kearney 2016-05-26 14:09:58 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/12038 has been closed
Comment 6 Stephen Wadeley 2016-07-15 03:01:44 EDT
Hello Justin

Can you tell me the package name?

Will the script be added to an existing package, such as rubygem-katello? If so, what version please.

I need to describe the procedure so need to explain that a specific package and version must be installed.

Thank you
Comment 7 Justin Sherrill 2016-07-18 08:46:45 EDT
Stephen,

The command is:


foreman-rake katello:upgrade_check


This has not been shipped yet (hasn't even been built yet), but will be shipped in ruby193-rubygem-katello-2.2.0.90-1-sat  (or later).  You might suggest that they need the latest, at least .90-1
Comment 8 Stephen Wadeley 2016-07-18 09:56:45 EDT
thank you Justin for comment 7
Comment 10 Og Maciel 2016-07-26 16:27:57 EDT
Tested on RHEL 6:

Package: ruby193-rubygem-katello-2.2.0.90-1.el6_6sat.noarch


foreman-rake katello:upgrade_check
This script makes no modifications and can be re-run multiple times for the most up to date results.
Checking upgradeability...

Checking for running tasks...
[PASS] - There are 1 active tasks.

Checking the current version...
[PASS] - Current version of the Katello Ruby RPM is 2.2.0.90 and needs to greater than or equal to 2.2.0.90

Checking content hosts...
Calculating Host changes on upgrade.  This may take a few minutes.


Summary:
Content hosts to be preserved: 4
Content hosts to be deleted: 8
Details on Content Hosts planned for deletion saved to /tmp/pre-upgrade-1469564448.csv
You may want to manually resolve some of the conflicts and duplicate Content Hosts.
Upon upgrade those found for deletion will be removed permanently.
Comment 11 jcallaha 2016-07-26 16:30:54 EDT
Tested output of the script on two populated RHEL7 machines.
katello-common-2.2.0.19-1.el7sat.noarch

---- Script run without conflicts ----
[root@ibm-x3550m3-06 ~]# foreman-rake katello:upgrade_check
This script makes no modifications and can be re-run multiple times for the most up to date results.
Checking upgradeability...

Checking for running tasks...
[PASS] - There are 0 active tasks.

Checking the current version...
[PASS] - Current version of the Katello Ruby RPM is 2.2.0.90 and needs to greater than or equal to 2.2.0.90

Checking content hosts...
Calculating Host changes on upgrade.  This may take a few minutes.
Upgrading will not affect any of your Content Hosts.


---- Script run with conflicts ----
[root@qe-sat6-upgrade-rhel7 etc]# foreman-rake katello:upgrade_check
This script makes no modifications and can be re-run multiple times for the most up to date results.
Checking upgradeability...

Checking for running tasks...
[PASS] - There are 0 active tasks.

Checking the current version...
[PASS] - Current version of the Katello Ruby RPM is 2.2.0.90 and needs to greater than or equal to 2.2.0.90

Checking content hosts...
Calculating Host changes on upgrade.  This may take a few minutes.


Summary:
Content hosts to be preserved: 6
Content hosts to be deleted: 13
Details on Content Hosts planned for deletion saved to /tmp/pre-upgrade-1469558864.csv
You may want to manually resolve some of the conflicts and duplicate Content Hosts.
Upon upgrade those found for deletion will be removed permanently.
This script makes no modifications and can be re-run multiple times for the most up to date results.
Calculating Host changes on upgrade.  This may take a few minutes.


Summary:
Content hosts to be preserved: 6
Content hosts to be deleted: 13
Details on Content Hosts planned for deletion saved to /tmp/pre-upgrade-1469558869.csv
You may want to manually resolve some of the conflicts and duplicate Content Hosts.
Upon upgrade those found for deletion will be removed permanently.
Comment 13 Og Maciel 2016-07-26 18:13:28 EDT
Satellite 6.1.9 installed on RHEL 6 Server
------------------------------------------

# rpm -q ruby193-rubygem-katello
ruby193-rubygem-katello-2.2.0.92-1.el6_6sat.noarch

# foreman-rake katello:upgrade_check
This script makes no modifications and can be re-run multiple times for the most up to date results.
Checking upgradeability...

Checking for running tasks...
[FAIL] - There are 1 active tasks.

Checking the current version...
[PASS] - Current version of the Katello Ruby RPM is 2.2.0.92 and needs to greater than or equal to 2.2.0.90

Checking content hosts...
Calculating Host changes on upgrade.  This may take a few minutes.


Summary:
Content hosts to be preserved: 4
Content hosts to be deleted: 8
Details on Content Hosts planned for deletion saved to /tmp/pre-upgrade-1469569343.csv
You may want to manually resolve some of the conflicts and duplicate Content Hosts.
Upon upgrade those found for deletion will be removed permanently.


Satellite 6.1.9 installed on RHEL 7 Server
------------------------------------------

# rpm -q ruby193-rubygem-katello
ruby193-rubygem-katello-2.2.0.92-1.el7sat.noarch

# foreman-rake katello:upgrade_check
This script makes no modifications and can be re-run multiple times for the most up to date results.
Checking upgradeability...

Checking for running tasks...
[PASS] - There are 0 active tasks.

Checking the current version...
[PASS] - Current version of the Katello Ruby RPM is 2.2.0.92 and needs to greater than or equal to 2.2.0.90

Checking content hosts...
Calculating Host changes on upgrade.  This may take a few minutes.


Summary:
Content hosts to be preserved: 10
Content hosts to be deleted: 9
Details on Content Hosts planned for deletion saved to /tmp/pre-upgrade-1469569946.csv
You may want to manually resolve some of the conflicts and duplicate Content Hosts.
Upon upgrade those found for deletion will be removed permanently.
This script makes no modifications and can be re-run multiple times for the most up to date results.
Calculating Host changes on upgrade.  This may take a few minutes.


Summary:
Content hosts to be preserved: 6
Content hosts to be deleted: 13
Details on Content Hosts planned for deletion saved to /tmp/pre-upgrade-1469569952.csv
You may want to manually resolve some of the conflicts and duplicate Content Hosts.
Upon upgrade those found for deletion will be removed permanently.
Comment 14 Og Maciel 2016-07-26 18:42:07 EDT
Comment #13 shows that the output for RHEL 7 shows a summary twice, with different numbers. I expected that only 1 summary would be displayed.

The output for RHEL 6 shows a FAIL due to a running task. I resumed this task and waited until it finished, then re-ran the script:

# foreman-rake katello:upgrade_check
This script makes no modifications and can be re-run multiple times for the most up to date results.
Checking upgradeability...

Checking for running tasks...
[PASS] - There are 0 active tasks.

Checking the current version...
[PASS] - Current version of the Katello Ruby RPM is 2.2.0.92 and needs to greater than or equal to 2.2.0.90

Checking content hosts...
Calculating Host changes on upgrade.  This may take a few minutes.


Summary:
Content hosts to be preserved: 4
Content hosts to be deleted: 8
Details on Content Hosts planned for deletion saved to /tmp/pre-upgrade-1469572579.csv
You may want to manually resolve some of the conflicts and duplicate Content Hosts.
Upon upgrade those found for deletion will be removed permanently.
Comment 15 Og Maciel 2016-07-26 19:04:39 EDT
Apparently an order version of a pre-upgrade check was moved to the RHEL 7 machine :/ Once I removed it and re-ran the script I got a valid output.

# foreman-rake katello:upgrade_check
This script makes no modifications and can be re-run multiple times for the most up to date results.
Checking upgradeability...

Checking for running tasks...
[PASS] - There are 0 active tasks.

Checking the current version...
[PASS] - Current version of the Katello Ruby RPM is 2.2.0.92 and needs to greater than or equal to 2.2.0.90

Checking content hosts...
Calculating Host changes on upgrade.  This may take a few minutes.


Summary:
Content hosts to be preserved: 10
Content hosts to be deleted: 9
Details on Content Hosts planned for deletion saved to /tmp/pre-upgrade-1469573885.csv
You may want to manually resolve some of the conflicts and duplicate Content Hosts.
Upon upgrade those found for deletion will be removed permanently.
Comment 17 Og Maciel 2016-07-26 19:05:55 EDT
Verified by QE and DEV
Comment 19 errata-xmlrpc 2016-07-27 03:13:01 EDT
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/RHBA-2016:1499

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