Execute checks after each stage of deployment
Checks are loaded in main.DeployLocal from YAML configuration under
the scap deploy subdirectory and run following execution of each stage.
Configuration takes the following form, where type is the type of
check to perform ('command' by default), command is a program (and its
arguments) that exits with non-zero status to signal check failure, and
stage is one of the main.DeployLocal stages for which the check will
checks: unique_check_name: type: command command: /path/to/command --with arguments stage: promote
New check types can be implemented by subclassing the checks.Check
class and registered for use in configuration via the
checks.checktype decorator. Validation can be added by implementing a
@checks.checktype('icinga') class IcingaCheck(checks.Check): def validate(self): # get/validate Icinga command
Checks are executed in parallel following the dispatch of a
main.DeployLocal stage. Any failed check should result in a rollback
prompt in main.Deploy.
The explicit check stage has been removed and the service port probe
has been moved to promote to ensure that the service has started
before executing checks.
Reviewers: demon, mmodell, mobrovac, thcipriani
Reviewed By: mmodell, thcipriani
Maniphest Tasks: T109515
Differential Revision: https://phabricator.wikimedia.org/D11