From 796342c06e8ca3dcfd2e8f1ba4e0300a703b8de1 Mon Sep 17 00:00:00 2001 From: Michael Still Date: Fri, 28 Dec 2012 11:08:20 +1100 Subject: [PATCH] Handle the new behaviour for invalid instances. The behaviour of this case changed with bug/836978. Requesting the status of an invalid instance will now return an error message including the instance id, so we need to filter that out. Resolves the devstack elements of bug 836978. Change-Id: I385eb6f04cff90e1ddc0b79d835fbbdf92e4e9ff --- exercises/euca.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/exercises/euca.sh b/exercises/euca.sh index 982653ef1d..76df254b45 100755 --- a/exercises/euca.sh +++ b/exercises/euca.sh @@ -165,8 +165,11 @@ fi euca-terminate-instances $INSTANCE || \ die "Failure terminating instance $INSTANCE" -# Assure it has terminated within a reasonable time -if ! timeout $TERMINATE_TIMEOUT sh -c "while euca-describe-instances $INSTANCE | grep -q $INSTANCE; do sleep 1; done"; then +# Assure it has terminated within a reasonable time. The behaviour of this +# case changed with bug/836978. Requesting the status of an invalid instance +# will now return an error message including the instance id, so we need to +# filter that out. +if ! timeout $TERMINATE_TIMEOUT sh -c "while euca-describe-instances $INSTANCE |grep -v \"InstanceNotFound\" | grep -q $INSTANCE; do sleep 1; done"; then echo "server didn't terminate within $TERMINATE_TIMEOUT seconds" exit 1 fi