Project

General

Profile

Actions

Bug #24784

closed

Foreman-maintain doesn't check if the server is up before hammer setup

Added by Martin Bacovsky almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Procedure
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

The procedure to setup hammer configuration tests the connection. If the service is down it fail. It could tell earlier if the server is running and suggest to turn on if not.
It may be good to consider how to behave when the services are down during various tasks. We could either skip some checks/procs or require them up.

Reproducer:

# rm /etc/foreman-maintain/foreman-maintain-hammer.ym
# foreman-maintain health check
Running preparation steps required to run the next scenarios
================================================================================
Setup hammer: 
Hammer admin password: 
                                                                      [FAIL]
Hammer configuration failed: Is the admin password correct? (it was stored in /etc/foreman-maintain/foreman-maintain-hammer.yml)Is the server down?
--------------------------------------------------------------------------------
Scenario [preparation steps required to run the next scenarios] failed.

The following steps ended up in failing state:

  [hammer-setup]

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

Actions #1

Updated by Ivan Necas almost 6 years ago

I think the simplest would be just to check on the service being running when calling the hammer setup, and if not, failing immediately, perhaps with remediation step to start the service (but I'm not sure how well this works right now in the preparation_steps - needs to be checked)

Actions #2

Updated by Martin Bacovsky almost 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Martin Bacovsky
  • Pull request https://github.com/theforeman/foreman_maintain/pull/217 added
Actions #3

Updated by Martin Bacovsky almost 6 years ago

  • Bugzilla link set to 1626651
Actions #4

Updated by Anonymous almost 6 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Ivan Necas almost 6 years ago

  • Fixed in Releases foreman_maintain-0.2.10 added
Actions

Also available in: Atom PDF