|
...
|
...
|
@@ -276,16 +276,18 @@ function init_glance {
|
|
276
|
276
|
rm -rf $GLANCE_IMAGE_DIR
|
|
277
|
277
|
mkdir -p $GLANCE_IMAGE_DIR
|
|
278
|
278
|
|
|
279
|
|
- # (Re)create glance database
|
|
280
|
|
- recreate_database glance
|
|
|
279
|
+ if is_service_enabled $DATABASE_BACKENDS; then
|
|
|
280
|
+ # (Re)create glance database
|
|
|
281
|
+ recreate_database glance
|
|
281
|
282
|
|
|
282
|
|
- time_start "dbsync"
|
|
283
|
|
- # Migrate glance database
|
|
284
|
|
- $GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_sync
|
|
|
283
|
+ time_start "dbsync"
|
|
|
284
|
+ # Migrate glance database
|
|
|
285
|
+ $GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_sync
|
|
285
|
286
|
|
|
286
|
|
- # Load metadata definitions
|
|
287
|
|
- $GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs
|
|
288
|
|
- time_stop "dbsync"
|
|
|
287
|
+ # Load metadata definitions
|
|
|
288
|
+ $GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs
|
|
|
289
|
+ time_stop "dbsync"
|
|
|
290
|
+ fi
|
|
289
|
291
|
}
|
|
290
|
292
|
|
|
291
|
293
|
# install_glanceclient() - Collect source and prepare
|