From fdbf0b8d911f5ff48f0b824d9bf93bebe1104611 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 24 Jul 2022 15:03:58 -0400 Subject: [PATCH] Add command output when host marked bad Allows easy replication of the failed command. --- rffmpeg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rffmpeg b/rffmpeg index 2dd80a2..44359ce 100755 --- a/rffmpeg +++ b/rffmpeg @@ -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"),