Have ecua.sh to accept the correct error code

ecua.sh will accept both the current and the correct error code

Change-Id: I364e411986b9780fd5c5df29697753f04a9a4935
This commit is contained in:
Attila Fazekas 2013-01-14 13:14:34 +01:00
parent fec9355fd2
commit 3860a9252a

View File

@ -169,7 +169,7 @@ euca-terminate-instances $INSTANCE || \
# case changed with bug/836978. Requesting the status of an invalid instance # 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 # will now return an error message including the instance id, so we need to
# filter that out. # 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 if ! timeout $TERMINATE_TIMEOUT sh -c "while euca-describe-instances $INSTANCE | grep -ve \"\\\(InstanceNotFound\\\|InvalidInstanceId\[.\]NotFound\\\)\" | grep -q $INSTANCE; do sleep 1; done"; then
echo "server didn't terminate within $TERMINATE_TIMEOUT seconds" echo "server didn't terminate within $TERMINATE_TIMEOUT seconds"
exit 1 exit 1
fi fi