Project

General

Profile

« Previous | Next » 

Revision c1d0531c

Added by Martin Bacovsky over 5 years ago

Fixes #24793 - Check running services without hammer

To run check on all the services got complicated with remote databases.
Technically Candlepin and Foreman DBs can be two different services.
To address this new object representing the service called
SystemService was added. It has name of the service and priority.
Its child RemoteDBService has also a component i.e. Foreman or
Candlepin in case of the postgresql. It alows us to keep
the service specific code isolated at one place. It is easy to extend
and we can tune the output of the individual actions separately.
Furthermore actions can return the exit codes so we can propagate
them correctly in the service commands.

The changes affected the service commands output but I tried to keep
it as close to the original state as possible. Currently the service
commands handle the remote service for each of the component separately.
E.g. foreman-maintain service status --only postgresql does check on
both the Candlepin and the Foreman DBs. Internally the Service::Status
procedure accept also SystemService object so can do status check only
for one component (this is not possible from CLI).

New check ServicesUp was added and it has no deps. It is always run
as part of upgrade and health check. If Katello is installed the
restart during the remediation step waits for hammer ping to finish.
Also if Katello is installed the original HammerPing check is perfomed
too as it has some additional value.

  • added
  • modified
  • copied
  • renamed
  • deleted