Merge "Init Glance database only on the node with the database backend"
This commit is contained in:
commit
c615f37c93
18
lib/glance
18
lib/glance
|
@ -276,16 +276,18 @@ function init_glance {
|
|||
rm -rf $GLANCE_IMAGE_DIR
|
||||
mkdir -p $GLANCE_IMAGE_DIR
|
||||
|
||||
# (Re)create glance database
|
||||
recreate_database glance
|
||||
if is_service_enabled $DATABASE_BACKENDS; then
|
||||
# (Re)create glance database
|
||||
recreate_database glance
|
||||
|
||||
time_start "dbsync"
|
||||
# Migrate glance database
|
||||
$GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_sync
|
||||
time_start "dbsync"
|
||||
# Migrate glance database
|
||||
$GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_sync
|
||||
|
||||
# Load metadata definitions
|
||||
$GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs
|
||||
time_stop "dbsync"
|
||||
# Load metadata definitions
|
||||
$GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs
|
||||
time_stop "dbsync"
|
||||
fi
|
||||
}
|
||||
|
||||
# install_glanceclient() - Collect source and prepare
|
||||
|
|
Loading…
Reference in New Issue