[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH 3/7] ts-hosts-allocate-Executive: Do a pre-check


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Wed, 19 Aug 2020 17:01:39 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Wed, 19 Aug 2020 16:02:08 +0000
  • Ironport-sdr: fQuG5WlXHINzhafW331wQcamnzx+XwJ/o4tphoHXcExCRjb9NpUiMcitUV92Ay4jvtqyZIHxl5 rKj22LyXsWHfUzdw24ncyY2wlx/4tQij2Hd+u8EjNJxvSAcJkg1wJtthXjYcWWCdNNDWMkEj7d fgPUniF0Fe7MGhuGgEL29gX17kbCigpHWcGw3cFMVXqv/EVSgq2BBp2nwMW95qnnkym8VAHeiW yeQ4L6j+4MdQa8i7cZBweAmedbH9jJ2zCuDjYhYVDVnzAmTCJKc2ocT8HGrwN/LhabjtX4ACxw zCw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxxxxx>
---
 ts-hosts-allocate-Executive | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index e5a6fbfe..4140b65c 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -692,6 +692,13 @@ sub alloc_hosts () {
         return;
     }
 
+    {
+       logm("pre-checking resources...");
+       local $Osstest::TestSupport::logm_prefix = $logm_prefix.' (precheck)';
+       my ($ok, $bookinglist) = attempt_allocation({}, 0);
+       die $ok if $ok>1 && $ok != $alloc_starved_r;
+    }
+
     my $waitstartadjust=
         $jobinfo->{recipe} =~ m/build/
         ? -10000
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.