Bug 1523957 - While running foreman-maintain (for 6.1 to 6.2) upgrade, it fails while stopping services due to incorrect option
Summary: While running foreman-maintain (for 6.1 to 6.2) upgrade, it fails while stopp...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.3.0
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: Unspecified
Assignee: Kavita
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks: 1496794
TreeView+ depends on / blocked
 
Reported: 2017-12-09 12:12 UTC by Gauravi
Modified: 2019-09-26 15:37 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-19 17:23:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 22149 0 Normal Closed While running foreman-maintain (for 6.1 to 6.2) upgrade, it fails while stopping services due to incorrect option 2020-10-14 13:35:09 UTC
Red Hat Product Errata RHBA-2018:0330 0 normal SHIPPED_LIVE Satellite Maintenance bug fix update 2018-02-19 22:22:51 UTC

Description Gauravi 2017-12-09 12:12:42 UTC
Description of problem:
While running foreman-maintain upgrade fails at stopping services due to incorrect option

# foreman-maintain upgrade run --target-version 6.2
Running preparation steps required to run the next scenarios
================================================================================
Procedures::Packages::Install: 
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Package hdparm-9.43-5.el7.x86_64 already installed and latest version
No package fio available.
Nothing to do
                                                                      [OK]
--------------------------------------------------------------------------------


Running Checks before upgrading to Satellite 6.2
================================================================================
Check for paused tasks:                                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running using hammer ping:             [FAIL]
Error: Connection refused - connect(2)
--------------------------------------------------------------------------------
Continue with step [katello-service restart]?, [y(yes), n(no), q(quit)] y
katello-service restart:                                                        
/ All services are running.                                           [OK]      
--------------------------------------------------------------------------------
Rerunning the check after fix procedure
Check whether all services are running using hammer ping:             [OK]
--------------------------------------------------------------------------------
Check for running tasks:                                              [OK]
--------------------------------------------------------------------------------
Check for old tasks in paused/stopped state:                          [OK]
--------------------------------------------------------------------------------
Check for pending tasks which are safe to delete:                     [OK]
--------------------------------------------------------------------------------
Check for tasks in planning state:                                    [OK]
--------------------------------------------------------------------------------
Check for recommended disk speed of pulp, mongodb, pgsql dir.: 
\ Finished                                                            [OK]      
--------------------------------------------------------------------------------


The pre-upgrade checks indicate that the system is ready for upgrade.
It's recommended to perform a backup at this stage.
Confirm to continue with the the modification part of the upgrade, [y(yes), n(no), q(quit)] y
Running Procedures before migrating to Satellite 6.2                            
================================================================================
Turn on maintenance mode:                                             [OK]
--------------------------------------------------------------------------------
disable active sync plans: 
/ Total 0 sync plans are now disabled.                                [OK]      
--------------------------------------------------------------------------------
katello-service stop: 
/ Stopping katello running services..                                 [FAIL]    
Failed executing katello-service stop --only foreman-proxy,foreman-tasks,httpd,mongod,pulp_celerybeat,pulp_resource_manager,qdrouterd,qpidd,tomcat, exit status 1:
 /usr/bin/katello-service:31:in `block in <main>': invalid option: --only (OptionParser::InvalidOption)
	from /usr/bin/katello-service:24:in `new'
	from /usr/bin/katello-service:24:in `<main>'
--------------------------------------------------------------------------------
Scenario [Procedures before migrating to Satellite 6.2] failed.

The following steps ended up in failing state:

  [katello-service-stop]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="katello-service-stop"

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

How reproducible:
Always on Satellite 6.1.12

Steps to Reproduce:
1. Run below command on Satellite 6.1.12 :
   #foreman-maintain upgrade run --target-version 6.2


Actual results:
Failed to stop katello services

Expected results:
katello services should be stopped

Additional info:
--only option is invalid in Satellite 6.1.12, the expected option is --exclude .

Comment 2 Nikhil Kathole 2017-12-12 09:18:09 UTC
# foreman-maintain advanced  procedure run katello-service-stop
Running ForemanMaintain::Scenario
================================================================================
katello-service stop:
/ Stopping katello running services..                                 [FAIL]
Failed executing katello-service stop --only foreman-proxy,foreman-tasks,httpd,mongod,pulp_celerybeat,pulp_resource_manager,qdrouterd,qpidd,tomcat, exit status 1:
 /usr/bin/katello-service:31:in `block in <main>': invalid option: --only (OptionParser::InvalidOption)
        from /usr/bin/katello-service:24:in `new'
        from /usr/bin/katello-service:24:in `<main>'
--------------------------------------------------------------------------------
Scenario [ForemanMaintain::Scenario] failed.

The following steps ended up in failing state:

  [katello-service-stop]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="katello-service-stop"

Comment 3 Satellite Program 2018-01-11 15:16:16 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/22149 has been resolved.

Comment 5 Mike McCune 2018-02-01 21:29:41 UTC
VERIFIED

# foreman-maintain upgrade run --target-version 6.2
...

\ Total 0 sync plans are now disabled.                                [OK]      
--------------------------------------------------------------------------------
katello-service stop: 
- Stopping katello running services..                                 [OK]      
--------------------------------------------------------------------------------


....

it completed the 6.1 > 6.2 upgrade without error.

Comment 8 errata-xmlrpc 2018-02-19 17:23:44 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/RHBA-2018:0330


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