From 87a2454a0948531ba7d7a6bc638b4ab93a571927 Mon Sep 17 00:00:00 2001 From: Digimer Date: Thu, 17 Feb 2022 13:56:29 -0500 Subject: [PATCH] Moved anvil-configure-host reboot logging to use log_0687 to help grep for reboot causes. Signed-off-by: Digimer --- share/words.xml | 1 + tools/anvil-configure-host | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/words.xml b/share/words.xml index dcf027fa..092fcb75 100644 --- a/share/words.xml +++ b/share/words.xml @@ -2085,6 +2085,7 @@ The file: [#!variable!file!#] needs to be updated. The difference is: Kernel updated, reboot queued. Requested to power-off as part of the anvil-safe-stop job. The anvil-safe-stop job has completed and will now power off. + The anvil-configure-host tool is requesting a reboot. The host name: [#!variable!target!#] does not resolve to an IP address. diff --git a/tools/anvil-configure-host b/tools/anvil-configure-host index 18b25b76..a9c8fbb0 100755 --- a/tools/anvil-configure-host +++ b/tools/anvil-configure-host @@ -113,6 +113,7 @@ sub do_reboot my ($anvil) = @_; # Mark that a reboot is needed, in case something kills us before we actually reboot. + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0687", variables => { reason => "log_0693" }}); my ($job_uuid) = $anvil->Database->insert_or_update_jobs({ file => $THIS_FILE, line => __LINE__, @@ -1233,7 +1234,7 @@ sub reconfigure_network # If we should reset, do so now. if ($anvil->data->{sys}{reboot}) { - $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, 'print' => 1, key => "log_0631"}); + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, 'print' => 1, key => "log_0687", variables => { reason => "log_0631" }}); do_reboot($anvil); } @@ -1241,7 +1242,7 @@ sub reconfigure_network { # In an attempt to make network changes more reliable, we'll just reboot. This shouldn't # actually be hit anymore as any change should have triggered the reboot above. - $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, 'print' => 1, key => "log_0631"}); + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, 'print' => 1, key => "log_0687", variables => { reason => "log_0631" }}); do_reboot($anvil); # # Re-read the config