ecua.sh will accept both the current and the correct error code
Change-Id: I364e411986b9780fd5c5df29697753f04a9a4935
| ... | ... |
@@ -169,7 +169,7 @@ euca-terminate-instances $INSTANCE || \ |
| 169 | 169 |
# case changed with bug/836978. Requesting the status of an invalid instance |
| 170 | 170 |
# will now return an error message including the instance id, so we need to |
| 171 | 171 |
# filter that out. |
| 172 |
-if ! timeout $TERMINATE_TIMEOUT sh -c "while euca-describe-instances $INSTANCE |grep -v \"InstanceNotFound\" | grep -q $INSTANCE; do sleep 1; done"; then |
|
| 172 |
+if ! timeout $TERMINATE_TIMEOUT sh -c "while euca-describe-instances $INSTANCE | grep -ve \"\\\(InstanceNotFound\\\|InvalidInstanceId\[.\]NotFound\\\)\" | grep -q $INSTANCE; do sleep 1; done"; then |
|
| 173 | 173 |
echo "server didn't terminate within $TERMINATE_TIMEOUT seconds" |
| 174 | 174 |
exit 1 |
| 175 | 175 |
fi |