|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 16/21] ts-host-allocate-Executive: Break out $now and add a newline
Prep work, no functional change.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
ts-hosts-allocate-Executive | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index 3da138b1..3425c8ce 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -756,12 +756,14 @@ sub attempt_allocation {
logm("host allocation: successful, reporting to planner.");
} else {
logm("host allocation: planned start in $best->{Start} seconds.");
+
my $maxwait = $r{hostalloc_maxwait_max};
+ my $now = time // die $!;
if (defined $maxwait) {
# We quit if:
# * we have been waiting at least $maxwait/2
# * we estimate it will take at least $maxwait overall
- my $wait_sofar = (time // die $!) - $alloc_start_time;
+ my $wait_sofar = $now - $alloc_start_time;
die "timed out: $wait_sofar, $best->{Start}, $maxwait"
if $wait_sofar > $maxwait/2
&& $wait_sofar + $best->{Start} > $maxwait;
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |