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

[OSSTEST PATCH 6/6] mg-repro-setup: Check allocation feasibility at the start



Signed-off-by: Ian Jackson <iwj@xxxxxxxxxxxxxx>
---
 mg-repro-setup | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/mg-repro-setup b/mg-repro-setup
index 56d27d4ef..895f29963 100755
--- a/mg-repro-setup
+++ b/mg-repro-setup
@@ -260,6 +260,17 @@ if [ "${alloc_idents[*]}" ]; then
                 echo >&2 'cannot hand-allocate in a way that will free'
                 exit 1
         fi
+
+       set +e
+       alloc_output=$(
+               ./mg-allocate --dry-run $duration "${alloc_specs[@]}" 2>&1
+       )
+       alloc_rc=$?
+       set -e
+       test $alloc_rc = 0 ||
+       fail "requested allocation(s) infeasible:
+$alloc_output
+"
 fi
 
 flight=$(./cs-adjust-flight new:$blessing)
-- 
2.20.1




 


Rackspace

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