Call attempt_allocation with an empty plan and $mayalloc=0.
In the usual case this will arrange to prime our memoisation caches
before we get involved with the queueing system.
It will also arrange for various errors to be reported sooner.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: Improved error and result handling
return;
}
+ {
+ logm("pre-checking resources...");
+ local $Osstest::TestSupport::logm_prefix = $logm_prefix.' (precheck)';
+ my ($ok, $bookinglist) = attempt_allocation({
+ ts_hosts_allocate_precheck => 1,
+ }, 0);
+ die $ok if $ok>1;
+ }
+
my $waitstartadjust=
$jobinfo->{recipe} =~ m/build/
? -10000
logm("no plan is possible - no suitable hosts");
return $alloc_starved_r;
}
+ return 0 if $plan->{ts_hosts_allocate_precheck};
foreach (my $ix=0; $ix<@hids; $ix++) {
$hids[$ix]{Selected}= $best->{Selections}[$ix];