From 4b82c5f2bfb137fe71ca2e1fd5eba4285417cf57 Mon Sep 17 00:00:00 2001 From: Madison Kelly Date: Thu, 6 Jun 2024 15:33:56 -0400 Subject: [PATCH] Added 'timeout' logging to help debug SIGALARM exits. Signed-off-by: digimer Signed-off-by: Madison Kelly --- Anvil/Tools/Network.pm | 18 ++++++++++++++++++ Anvil/Tools/System.pm | 4 ++++ share/words.xml | 4 +++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Anvil/Tools/Network.pm b/Anvil/Tools/Network.pm index 58bf1ed7..71c17c55 100644 --- a/Anvil/Tools/Network.pm +++ b/Anvil/Tools/Network.pm @@ -4283,6 +4283,24 @@ sub ping target => $target, is_local => $is_local, }}); + if ($timeout) + { + if ($is_local) + { + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, secure => $secure, key => "log_0855", variables => { + shell_call => $shell_call, + timeout => $timeout, + }}); + } + else + { + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, secure => $secure, key => "log_0853", variables => { + shell_call => $shell_call, + timeout => $timeout, + target => $target, + }}); + } + } if ($is_local) { ### Local calls diff --git a/Anvil/Tools/System.pm b/Anvil/Tools/System.pm index 6f42ccfd..793f7168 100644 --- a/Anvil/Tools/System.pm +++ b/Anvil/Tools/System.pm @@ -309,6 +309,10 @@ sub call if ($timeout) { # Prepend a timeout. + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, secure => $secure, key => "log_0855", variables => { + shell_call => $shell_call, + timeout => $timeout, + }}); $shell_call = $anvil->data->{path}{exe}{timeout}." ".$timeout." ".$shell_call; $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => $secure, list => { shell_call => $shell_call }}); } diff --git a/share/words.xml b/share/words.xml index 6ba71d81..0cfff45c 100644 --- a/share/words.xml +++ b/share/words.xml @@ -2742,6 +2742,8 @@ new key: [#!variable!new_key!#] Finished configuring bonds. Now configuring bridges. The connection to the database: [#!variable!server!#] has been restored! + Calling: [#!variable!shell_call!#] via a 'timeout' of: [#!variable!timeout!#] seconds. + Calling: [#!variable!shell_call!#] on: [#!variable!target!#] via a 'timeout' of: [#!variable!timeout!#] seconds. The host name: [#!variable!target!#] does not resolve to an IP address. @@ -3109,7 +3111,7 @@ Are you sure that you want to delete the server: [#!variable!server_name!#]? [Ty Preparing to get server VM screenshot. Finished getting server VM screenshot. Failed to get server VM screenshot; got non-zero return code. - Finished attempting to get server VM screenshot; no operations happened because requirements not met.>>> master + Finished attempting to get server VM screenshot; no operations happened because requirements not met. Preparing to manage DR for a server. UUID Column counts for: [history.#!variable!table!#]: Counting entries for each unique: [#!variable!column!#] in the table [#!variable!table!#]. Please be patient.