| ... | ... |
@@ -276,18 +276,16 @@ function init_glance {
|
| 276 | 276 |
rm -rf $GLANCE_IMAGE_DIR |
| 277 | 277 |
mkdir -p $GLANCE_IMAGE_DIR |
| 278 | 278 |
|
| 279 |
- if is_service_enabled $DATABASE_BACKENDS; then |
|
| 280 |
- # (Re)create glance database |
|
| 281 |
- recreate_database glance |
|
| 279 |
+ # (Re)create glance database |
|
| 280 |
+ recreate_database glance |
|
| 282 | 281 |
|
| 283 |
- time_start "dbsync" |
|
| 284 |
- # Migrate glance database |
|
| 285 |
- $GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_sync |
|
| 282 |
+ time_start "dbsync" |
|
| 283 |
+ # Migrate glance database |
|
| 284 |
+ $GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_sync |
|
| 286 | 285 |
|
| 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 |
|
| 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" |
|
| 291 | 289 |
} |
| 292 | 290 |
|
| 293 | 291 |
# install_glanceclient() - Collect source and prepare |
| ... | ... |
@@ -1155,7 +1155,8 @@ fi |
| 1155 | 1155 |
# Glance |
| 1156 | 1156 |
# ------ |
| 1157 | 1157 |
|
| 1158 |
-if is_service_enabled g-reg; then |
|
| 1158 |
+# NOTE(yoctozepto): limited to node hosting the database which is the controller |
|
| 1159 |
+if is_service_enabled $DATABASE_BACKENDS && is_service_enabled glance; then |
|
| 1159 | 1160 |
echo_summary "Configuring Glance" |
| 1160 | 1161 |
init_glance |
| 1161 | 1162 |
fi |
| ... | ... |
@@ -1280,8 +1281,8 @@ fi |
| 1280 | 1280 |
# scripts as userdata. |
| 1281 | 1281 |
# See https://help.ubuntu.com/community/CloudInit for more on ``cloud-init`` |
| 1282 | 1282 |
|
| 1283 |
-if is_service_enabled g-reg; then |
|
| 1284 |
- |
|
| 1283 |
+# NOTE(yoctozepto): limited to node hosting the database which is the controller |
|
| 1284 |
+if is_service_enabled $DATABASE_BACKENDS && is_service_enabled glance; then |
|
| 1285 | 1285 |
echo_summary "Uploading images" |
| 1286 | 1286 |
|
| 1287 | 1287 |
for image_url in ${IMAGE_URLS//,/ }; do
|