* Updated anvil-daemon to not hold jobs at startup is the host isn't configured yet.

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 1 year ago
parent 688e8509bf
commit f57ab1a78c
  1. 5
      tools/anvil-configure-host
  2. 5
      tools/anvil-daemon

@ -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.

@ -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,

Loading…
Cancel
Save