Fixes #19227 - katello-change-hostname health check #424
Fixes #19227 - katello-change-hostname health check #424
Conversation
@johnpmitsch, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
Failing hammer ping status - script terminates
Successful hammer ping status - script completes successfully
|
334dc7b
to
c80b82c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one small comment.
katello/katello-change-hostname
Outdated
hammer_ping_failure = $?.success? | ||
if hammer_ping_failure | ||
STDOUT.puts "All services are not currently running, please check 'hammer ping'" | ||
exit(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about the case when hammer ping
returns overall failure? To test this, stop your katello server. hammer_ping_failure
is false in that case.
c80b82c
to
b78ad74
Compare
This will check services before running the hostname change. A `hammer ping` doesn't return a failing exit code if a service is failing, so this makes use of grepping FAIL
b78ad74
to
971082b
Compare
@akofink I updated to check the return code as well, this will be != 0 if the "status" of hammer ping is failing. Side note -- shouldn't hammer ping display the overall status as well? |
It does display an overall status in some cases, but if the server is down, no response is sent. $ hammer ping
Error: 503 Service Unavailable |
LGTM! ACK! |
This will check services before running the hostname change.
A
hammer ping
doesn't return a failing exit code if aservice is failing, so this makes use of grepping FAIL