From f57ab1a78cc8d0647eaa7cb495f31e7f3758e022 Mon Sep 17 00:00:00 2001 From: digimer Date: Sun, 23 Jul 2023 23:34:39 -0400 Subject: [PATCH] * Updated anvil-daemon to not hold jobs at startup is the host isn't configured yet. Signed-off-by: digimer --- tools/anvil-configure-host | 5 ++++- tools/anvil-daemon | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/anvil-configure-host b/tools/anvil-configure-host index 96cfb026..bfd4e7a6 100755 --- a/tools/anvil-configure-host +++ b/tools/anvil-configure-host @@ -1687,7 +1687,10 @@ AND { # To make logs more sensible, we'll call 'problem' as 'out_of_cluster'. my ($out_of_cluster) = $anvil->Cluster->parse_cib(); - $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { out_of_cluster => $out_of_cluster }}); + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { + out_of_cluster => $out_of_cluster, + "cib::parsed::local::ready" => $anvil->data->{cib}{parsed}{'local'}{ready}, + }}); if ((not $out_of_cluster) && ($anvil->data->{cib}{parsed}{'local'}{ready})) { # We're in a cluster, abort. diff --git a/tools/anvil-daemon b/tools/anvil-daemon index 6b3c282a..009a3232 100755 --- a/tools/anvil-daemon +++ b/tools/anvil-daemon @@ -1585,6 +1585,9 @@ sub run_jobs # changed on disk. $anvil->data->{sys}{jobs_running} = 0; + # If we're not configured, we won't hold on starting jobs + my $configured = $anvil->System->check_if_configured; + # We'll also update the jobs.json file. my $jobs_file = "{\"jobs\":[\n"; @@ -1659,7 +1662,7 @@ sub run_jobs } # If this is a start-up call, only start jobs whose status is 'anvil_startup'. - if (($startup) && ($job_status ne "anvil_startup")) + if (($startup) && ($configured) && ($job_status ne "anvil_startup")) { $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0639", variables => { job_uuid => $job_uuid,