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
This commit is contained in:
parent
cf37f6a0f2
commit
796342c06e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user