RUNNING_TIMEOUT = BOOT_TIMEOUT + ACTIVE_TIMEOUT
This commit is contained in:
parent
0367cf1585
commit
9a3066f9fd
@ -28,8 +28,8 @@ IMAGE=`euca-describe-images | grep machine | cut -f2`
|
|||||||
INSTANCE=`euca-run-instances $IMAGE | grep INSTANCE | cut -f2`
|
INSTANCE=`euca-run-instances $IMAGE | grep INSTANCE | cut -f2`
|
||||||
|
|
||||||
# assure it has booted within a reasonable time
|
# assure it has booted within a reasonable time
|
||||||
if ! timeout $BOOT_TIMEOUT sh -c "while euca-describe-instances $INSTANCE | grep -q running; do sleep 1; done"; then
|
if ! timeout $RUNNING_TIMEOUT sh -c "while euca-describe-instances $INSTANCE | grep -q running; do sleep 1; done"; then
|
||||||
echo "server didn't become active within $BOOT_TIMEOUT seconds"
|
echo "server didn't become active within $RUNNING_TIMEOUT seconds"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
3
openrc
3
openrc
@ -55,5 +55,8 @@ export BOOT_TIMEOUT=${BOOT_TIMEOUT:-15}
|
|||||||
# Max time to wait while vm goes from build to active state
|
# Max time to wait while vm goes from build to active state
|
||||||
export ACTIVE_TIMEOUT=${ACTIVE_TIMEOUT:-10}
|
export ACTIVE_TIMEOUT=${ACTIVE_TIMEOUT:-10}
|
||||||
|
|
||||||
|
# Max time from run instance command until it is running
|
||||||
|
export RUNNING_TIMEOUT=${RUNNING_TIMEOUT:-$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))}
|
||||||
|
|
||||||
# Max time to wait for proper IP association and dis-association.
|
# Max time to wait for proper IP association and dis-association.
|
||||||
export ASSOCIATE_TIMEOUT=${ASSOCIATE_TIMEOUT:-10}
|
export ASSOCIATE_TIMEOUT=${ASSOCIATE_TIMEOUT:-10}
|
||||||
|
Loading…
Reference in New Issue
Block a user