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 1487546 - Failed check/procedure/upgrade should exit with non-zero error code
Summary: Failed check/procedure/upgrade should exit with non-zero error code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Unspecified
Assignee: Swapnil Abnave
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-01 08:51 UTC by Ivan Necas
Modified: 2019-04-12 15:04 UTC (History)
5 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20623 0 Normal Closed Failed check/procedure/upgrade should exit with non-zero error code 2020-11-10 18:09:18 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 Ivan Necas 2017-09-01 08:51:53 UTC
1. run check/upgrade check/upgrade run that ends with failed state
2. echo $?

It is 0

It should not be 0

Comment 1 Ivan Necas 2017-09-01 08:51:59 UTC
Created from redmine issue http://projects.theforeman.org/issues/20623

Comment 2 Ivan Necas 2017-09-01 08:52:05 UTC
Upstream bug assigned to None

Comment 4 Satellite Program 2017-09-05 12:18:19 UTC
Upstream bug assigned to sabnave

Comment 8 Satellite Program 2017-09-13 12:17:55 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20623 has been resolved.

Comment 9 Nikhil Kathole 2017-12-20 07:15:54 UTC
VERIFIED

Version tested:
# rpm -q rubygem-foreman_maintain
rubygem-foreman_maintain-0.1.1-1.el7sat.noarch


foreman-maintain health/upgrade/advanced returned 1 (exits with non-zero error) if completed with failed state.

# foreman-maintain upgrade check
--target-version not specified
Possible target versions are:
6.3.z
# echo $?
1

# foreman-maintain upgrade check --target-version 6.3.z
Running preparation steps required to run the next scenarios
================================================================================
Procedures::Packages::Install:
Package hdparm-9.43-5.el7.x86_64 already installed and latest version
                                                                      [OK]
--------------------------------------------------------------------------------


Running Checks before upgrading to Satellite 6.3.z
================================================================================
Check for verifying syntax for ISP DHCP configurations:               [OK]
--------------------------------------------------------------------------------
Check for paused tasks:                                               [OK]
--------------------------------------------------------------------------------
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                                                            [FAIL]
Slow disk detected /var/lib/pulp mounted on /dev/mapper/rhel-root.
             Actual disk speed: 63 MB/sec
             Expected disk speed: 80 MB/sec.
--------------------------------------------------------------------------------
Scenario [Checks before upgrading to Satellite 6.3.z] failed.

The following steps ended up in failing state:

  [disk-io]

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

# echo $?
1

# foreman-maintain health check
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check for verifying syntax for ISP DHCP configurations:               [OK]
--------------------------------------------------------------------------------
Check for paused tasks:                                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running using hammer ping:             [FAIL]
pulp, pulp_auth resource(s) are failing.
--------------------------------------------------------------------------------
Continue with step [katello-service restart--only pulp_resource_manager,pulp_workers,pulp_celerybeat,pulp_resource_manager,pulp_workers,pulp_celerybeat]?, [y(yes), n(no), q(quit)] q
Scenario [ForemanMaintain::Scenario::FilteredScenario] failed.

The following steps ended up in failing state:

  [hammer-ping]

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

# echo $?
1

Comment 12 errata-xmlrpc 2018-02-19 17:22:26 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.