Browse code

Merge "only do a dbsync if on the database node"

Jenkins authored on 2014/03/02 03:54:57
Showing 1 changed files
... ...
@@ -180,9 +180,11 @@ function init_ceilometer {
180 180
     sudo chown $STACK_USER $CEILOMETER_AUTH_CACHE_DIR
181 181
     rm -f $CEILOMETER_AUTH_CACHE_DIR/*
182 182
 
183
-    if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then
184
-        recreate_database ceilometer utf8
185
-        $CEILOMETER_BIN_DIR/ceilometer-dbsync
183
+    if is_service_enabled mysql postgresql; then
184
+        if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then
185
+            recreate_database ceilometer utf8
186
+            $CEILOMETER_BIN_DIR/ceilometer-dbsync
187
+        fi
186 188
     fi
187 189
 }
188 190