Page MenuHomePhabricator

The `logstash_checker.py` script should accept a float for `--delay`
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):
This was noticed during today's scap stage-train. I have not reproduced it in another environment.

What happens?:
scap stage-train fails with:

16:21:22 Check 'Logstash Error rate for mw1447.eqiad.wmnet' failed: usage: logstash_checker.py [-h] [--service-name SERVICE_NAME] --host HOST
                           [--logstash-host LOGSTASH_HOST] [--delay DELAY]
                           [--fail-threshold FAIL_THRESHOLD]
                           [--absolute-threshold ABSOLUTE_THRESHOLD]
                           [--user USER] [--password] [-v]
logstash_checker.py: error: argument --delay: invalid int value: '40.406498670578'

What should have happened instead?:
The execution of logstash_checker.py should have completed with a non-errant status. Scap expects to be able to invoke the script with a float argument, so let's refactor logstash_checker.py to allow --delay to be a float or int.

Event Timeline

https://gerrit.wikimedia.org/r/c/operations/puppet/+/803583 was merged and scap stage-train now successfully executes logstash_checker.py. Note I errantly tagged it with the parent train task instead of this one. (Oops.)