Ensure cm-api is ready before start cm-alarm

The patch ensure that ceilometer-api is ready before
starting the ceilometer-alarm-evaluator service.

This ensure that ceilometer-alarm-evaluator doesn't log a error message
on startup due to not yet available ceilometer-api.

Closes bug: #1243249

Change-Id: Icff3e972ec485f26c014071f68079593a14b7240
This commit is contained in:
Mehdi Abaakouk 2013-10-23 10:37:05 +02:00
parent 6730a9d1c6
commit 1ed64cbbf0

View File

@ -138,6 +138,12 @@ function start_ceilometer() {
screen_it ceilometer-acentral "cd ; ceilometer-agent-central --config-file $CEILOMETER_CONF"
screen_it ceilometer-collector "cd ; ceilometer-collector --config-file $CEILOMETER_CONF"
screen_it ceilometer-api "cd ; ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF"
echo "Waiting for ceilometer-api to start..."
if ! timeout $SERVICE_TIMEOUT sh -c "while ! curl --noproxy '*' -s http://localhost:8777/v2/ >/dev/null; do sleep 1; done"; then
die $LINENO "ceilometer-api did not start"
fi
screen_it ceilometer-alarm-notifier "cd ; ceilometer-alarm-notifier --config-file $CEILOMETER_CONF"
screen_it ceilometer-alarm-evaluator "cd ; ceilometer-alarm-evaluator --config-file $CEILOMETER_CONF"
}