diskimage-builder/elements/nova-api/upstart/nova-api.conf
Tim Miller 89b245c604 Install nova-api from github.
Change-Id: If3b2818386a58a5effcfb3cc93579dc296536733
2012-12-20 15:04:34 -08:00

30 lines
650 B
Text

description "OpenStack Nova API Service"
start on runlevel [2345]
stop on runlevel [016]
setuid nova
setgid nova
respawn
exec /opt/stack/nova/bin/nova-api
# wait until service is running.
post-start script
svc_port=$(grep ^osapi_compute_listen_port /etc/nova/nova.conf ||:)
svc_port=${svc_port##*=}
if [ -z "$svc_port" ] ; then
svc_port="8774"
fi
for try in $(seq 9 -1 1); do
if nc -w 1 localhost $svc_port < /dev/null ; then
echo Connected to port $svc_port!
exit 0
fi
echo Could not connect to $svc_port, retrying $try more times...
sleep 1
done
end script