Add command output when host marked bad

Allows easy replication of the failed command.
This commit is contained in:
Joshua M. Boniface 2022-07-24 15:03:58 -04:00
parent 57cb6f8b67
commit fdbf0b8d91

View file

@ -280,11 +280,16 @@ def get_target_host(config):
if retcode != 0:
# Mark the host as bad
with dbconn(config) as cur:
log.info(
log.warning(
"Marking host {} as bad due to retcode {}".format(
host["hostname"], retcode
)
)
log.info(
"SSH command was: {}".format(
" ".join(test_ssh_command + test_ffmpeg_command)
)
)
cur.execute(
"INSERT INTO states (host_id, process_id, state) VALUES (?, ?, ?)",
(hid, config["current_pid"], "bad"),