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 .
# 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"
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/22149 has been resolved.
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.
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