ceilometer should only try to reset the database if it's actually
on a node where there is a database.
Change-Id: Ibcfec0556829bff0938e3769c19d34ae6c02b738
| ... | ... |
@@ -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 |
|