Description of problem: The 'hammer ping' command returns a 0 exit code even with a failed service. Version-Release number of selected component (if applicable): tfm-rubygem-hammer_cli-2.1.2-1.el7sat.noarch How reproducible: 1. Stop a service. # satellite-maintain service stop --only rh-mongodb34-mongod.service 2. Execute the command; note that there are FAIL statuses. # hammer ping database: Status: ok Server Response: Duration: 0ms candlepin: Status: ok Server Response: Duration: 55ms candlepin_events: Status: ok message: 0 Processed, 0 Failed Server Response: Duration: 0ms candlepin_auth: Status: ok Server Response: Duration: 40ms katello_events: Status: ok message: 0 Processed, 0 Failed Server Response: Duration: 0ms pulp: Status: FAIL Server Response: Message: Pulp database connection issue at https://satellite.localdomain/pulp/api/v2. pulp_auth: Status: FAIL Server Response: Message: Skipped pulp_auth check after failed pulp check foreman_tasks: Status: ok Server Response: Duration: 5ms 3. Check the exit code. # echo $? 0 Actual results: Exit code is "0". Expected results: Exit code should be non-zero. Additional info: This seems this worked in the past; please reference: Bug 1054362 - [RFE] Ping command sbould return status based on backend services being up or down [https://bugzilla.redhat.com/show_bug.cgi?id=1054362] Bug 1094826 - Hammer ping command returns wrong return code [https://bugzilla.redhat.com/show_bug.cgi?id=1094826]
Connecting redmine issue https://projects.theforeman.org/issues/30496 from this bug
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30496 has been resolved.
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 6.10 Satellite Tools Release), 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-2021:4701