File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,9 @@ if [ ! -n "$HOST_IP" ]; then
175175 HOST_IP=` LC_ALL=C /sbin/ifconfig | grep -m 1 ' inet addr:' | cut -d: -f2 | awk ' {print $1}' `
176176fi
177177
178+ # Service startup timeout
179+ SERVICE_TIMEOUT=${SERVICE_TIMEOUT:- 60}
180+
178181# Generic helper to configure passwords
179182function read_password {
180183 set +o xtrace
926929if [[ " $ENABLED_SERVICES " =~ " g-api" ]]; then
927930 screen_it g-api " cd $GLANCE_DIR ; bin/glance-api --config-file=etc/glance-api.conf"
928931 echo " Waiting for g-api ($GLANCE_HOSTPORT ) to start..."
929- if ! timeout 60 sh -c " while ! wget -q -O- http://$GLANCE_HOSTPORT ; do sleep 1; done" ; then
932+ if ! timeout $SERVICE_TIMEOUT sh -c " while ! wget -q -O- http://$GLANCE_HOSTPORT ; do sleep 1; done" ; then
930933 echo " g-api did not start"
931934 exit 1
932935 fi
936939if [[ " $ENABLED_SERVICES " =~ " key" ]]; then
937940 screen_it key " cd $KEYSTONE_DIR && $KEYSTONE_DIR /bin/keystone --config-file $KEYSTONE_CONF -d"
938941 echo " Waiting for keystone to start..."
939- if ! timeout 60 sh -c " while ! wget -q -O- http://127.0.0.1:5000; do sleep 1; done" ; then
942+ if ! timeout $SERVICE_TIMEOUT sh -c " while ! wget -q -O- http://127.0.0.1:5000; do sleep 1; done" ; then
940943 echo " keystone did not start"
941944 exit 1
942945 fi
946949if [[ " $ENABLED_SERVICES " =~ " n-api" ]]; then
947950 screen_it n-api " cd $NOVA_DIR && $NOVA_DIR /bin/nova-api"
948951 echo " Waiting for nova-api to start..."
949- if ! timeout 60 sh -c " while ! wget -q -O- http://127.0.0.1:8774; do sleep 1; done" ; then
952+ if ! timeout $SERVICE_TIMEOUT sh -c " while ! wget -q -O- http://127.0.0.1:8774; do sleep 1; done" ; then
950953 echo " nova-api did not start"
951954 exit 1
952955 fi
You can’t perform that action at this time.
0 commit comments