Browse code

Change ordering of ceilometer service startup

If the compute-agent starts before the collector directly
after a start or restart of the AMQP service, samples published from
the compute-agent can be lost before the collector has had a chance
to establish connections. These lost samples impact the reliability
of tests which run immediately after the service [re]start.

Note: if there is a restart of the ceilo service, but not the AMQP
service, the problem does not present itself becaue the messaging
service maintains some state on the exchanges it keeps.

Change-Id: I1c06d0511fbf93050cda56d9d2de0ff00813dfb6
Closes-bug: 1355809

Chris Dent authored on 2014/08/12 22:27:58
Showing 1 changed files
... ...
@@ -223,16 +223,19 @@ function install_ceilometerclient {
223 223
 
224 224
 # start_ceilometer() - Start running processes, including screen
225 225
 function start_ceilometer {
226
+    screen_it ceilometer-acentral "cd ; ceilometer-agent-central --config-file $CEILOMETER_CONF"
227
+    screen_it ceilometer-anotification "cd ; ceilometer-agent-notification --config-file $CEILOMETER_CONF"
228
+    screen_it ceilometer-collector "cd ; ceilometer-collector --config-file $CEILOMETER_CONF"
229
+    screen_it ceilometer-api "cd ; ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF"
230
+
231
+    # Start the compute agent last to allow time for the collector to
232
+    # fully wake up and connect to the message bus. See bug #1355809
226 233
     if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
227 234
         screen_it ceilometer-acompute "cd ; sg $LIBVIRT_GROUP 'ceilometer-agent-compute --config-file $CEILOMETER_CONF'"
228 235
     fi
229 236
     if [[ "$VIRT_DRIVER" = 'vsphere' ]]; then
230 237
         screen_it ceilometer-acompute "cd ; ceilometer-agent-compute --config-file $CEILOMETER_CONF"
231 238
     fi
232
-    screen_it ceilometer-acentral "cd ; ceilometer-agent-central --config-file $CEILOMETER_CONF"
233
-    screen_it ceilometer-anotification "cd ; ceilometer-agent-notification --config-file $CEILOMETER_CONF"
234
-    screen_it ceilometer-collector "cd ; ceilometer-collector --config-file $CEILOMETER_CONF"
235
-    screen_it ceilometer-api "cd ; ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF"
236 239
 
237 240
     # only die on API if it was actually intended to be turned on
238 241
     if is_service_enabled ceilometer-api; then