Permalink
Browse files

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

  • Loading branch information...
2 parents 3de8607 + c921a95 commit fe09741e14f94679bdf90e663860a3e9dd55da2d Jenkins committed with openstack-gerrit Mar 1, 2014
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/ceilometer
View
8 lib/ceilometer
@@ -180,9 +180,11 @@ function init_ceilometer {
sudo chown $STACK_USER $CEILOMETER_AUTH_CACHE_DIR
rm -f $CEILOMETER_AUTH_CACHE_DIR/*
- if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then
- recreate_database ceilometer utf8
- $CEILOMETER_BIN_DIR/ceilometer-dbsync
+ if is_service_enabled mysql postgresql; then
+ if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then
+ recreate_database ceilometer utf8
+ $CEILOMETER_BIN_DIR/ceilometer-dbsync
+ fi
fi
}

0 comments on commit fe09741

Please sign in to comment.