Project

General

Profile

Bug #6450

Hammer ping command returns wrong return code

Added by Adam Price over 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1094826
Description of problem:
When running hammer ping command it is returning a non zero return code even if all services is ok

Version-Release number of selected component (if applicable):
  1. hammer --version
    hammer (0.1.0) * hammer_cli_foreman (0.1.0) * hammer_cli_katello (0.0.3)

How reproducible:
Aways

Steps to Reproduce:
1. Run hammer ping
2. Check if all services have the ok status
3. Run echo $? to read the return code

Actual results:
  1. hammer ping
    candlepin:
    Status: ok
    Server Response: Duration: 24ms
    candlepin_auth:
    Status: ok
    Server Response: Duration: 26ms
    pulp:
    Status: ok
    Server Response: Duration: 16ms
    pulp_auth:
    Status: ok
    Server Response: Duration: 26ms
    elasticsearch:
    Status: ok
    Server Response: Duration: 28ms
    katello_jobs:
    Status: ok
    Server Response: Duration: 39ms
  1. echo $?
    1
Expected results:
  1. hammer ping
    candlepin:
    Status: ok
    Server Response: Duration: 24ms
    candlepin_auth:
    Status: ok
    Server Response: Duration: 26ms
    pulp:
    Status: ok
    Server Response: Duration: 16ms
    pulp_auth:
    Status: ok
    Server Response: Duration: 26ms
    elasticsearch:
    Status: ok
    Server Response: Duration: 28ms
    katello_jobs:
    Status: ok
    Server Response: Duration: 39ms
  1. echo $?
    0

Additional info:

Associated revisions

Revision 3e193e56 (diff)
Added by Adam Price over 6 years ago

fixes #6450 - server returns correctly summary status, BZ 1094826

Revision 1f33d938
Added by Adam Price over 6 years ago

Merge pull request #4370 from komidore64/rmi6450-hammer-ping-correct-exitstatus

fixes #6450 - server returns correctly summary status, BZ 1094826

History

#1 Updated by Anonymous over 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

#2 Updated by Eric Helms over 6 years ago

  • Triaged changed from No to Yes

#3 Updated by Eric Helms over 6 years ago

  • Target version set to 48

#4 Updated by Eric Helms about 6 years ago

  • Legacy Backlogs Release (now unused) set to 13

Also available in: Atom PDF