|
...
|
...
|
@@ -814,6 +814,11 @@ fi
|
|
814
|
814
|
# ------
|
|
815
|
815
|
|
|
816
|
816
|
if is_service_enabled g-reg; then
|
|
|
817
|
+ GLANCE_CONF_DIR=/etc/glance
|
|
|
818
|
+ if [[ ! -d $GLANCE_CONF_DIR ]]; then
|
|
|
819
|
+ sudo mkdir -p $GLANCE_CONF_DIR
|
|
|
820
|
+ fi
|
|
|
821
|
+ sudo chown `whoami` $GLANCE_CONF_DIR
|
|
817
|
822
|
GLANCE_IMAGE_DIR=$DEST/glance/images
|
|
818
|
823
|
# Delete existing images
|
|
819
|
824
|
rm -rf $GLANCE_IMAGE_DIR
|
|
...
|
...
|
@@ -845,22 +850,22 @@ if is_service_enabled g-reg; then
|
|
845
|
845
|
}
|
|
846
|
846
|
|
|
847
|
847
|
# Copy over our glance configurations and update them
|
|
848
|
|
- GLANCE_REGISTRY_CONF=$GLANCE_DIR/etc/glance-registry.conf
|
|
|
848
|
+ GLANCE_REGISTRY_CONF=$GLANCE_CONF_DIR/glance-registry.conf
|
|
849
|
849
|
cp $FILES/glance-registry.conf $GLANCE_REGISTRY_CONF
|
|
850
|
850
|
glance_config $GLANCE_REGISTRY_CONF
|
|
851
|
851
|
|
|
852
|
852
|
if [[ -e $FILES/glance-registry-paste.ini ]]; then
|
|
853
|
|
- GLANCE_REGISTRY_PASTE_INI=$GLANCE_DIR/etc/glance-registry-paste.ini
|
|
|
853
|
+ GLANCE_REGISTRY_PASTE_INI=$GLANCE_CONF_DIR/glance-registry-paste.ini
|
|
854
|
854
|
cp $FILES/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI
|
|
855
|
855
|
glance_config $GLANCE_REGISTRY_PASTE_INI
|
|
856
|
856
|
fi
|
|
857
|
857
|
|
|
858
|
|
- GLANCE_API_CONF=$GLANCE_DIR/etc/glance-api.conf
|
|
|
858
|
+ GLANCE_API_CONF=$GLANCE_CONF_DIR/glance-api.conf
|
|
859
|
859
|
cp $FILES/glance-api.conf $GLANCE_API_CONF
|
|
860
|
860
|
glance_config $GLANCE_API_CONF
|
|
861
|
861
|
|
|
862
|
862
|
if [[ -e $FILES/glance-api-paste.ini ]]; then
|
|
863
|
|
- GLANCE_API_PASTE_INI=$GLANCE_DIR/etc/glance-api-paste.ini
|
|
|
863
|
+ GLANCE_API_PASTE_INI=$GLANCE_CONF_DIR/glance-api-paste.ini
|
|
864
|
864
|
cp $FILES/glance-api-paste.ini $GLANCE_API_PASTE_INI
|
|
865
|
865
|
glance_config $GLANCE_API_PASTE_INI
|
|
866
|
866
|
fi
|
|
...
|
...
|
@@ -1430,12 +1435,12 @@ screen -r stack -X hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<
|
|
1430
|
1430
|
|
|
1431
|
1431
|
# launch the glance registry service
|
|
1432
|
1432
|
if is_service_enabled g-reg; then
|
|
1433
|
|
- screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=etc/glance-registry.conf"
|
|
|
1433
|
+ screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf"
|
|
1434
|
1434
|
fi
|
|
1435
|
1435
|
|
|
1436
|
1436
|
# launch the glance api and wait for it to answer before continuing
|
|
1437
|
1437
|
if is_service_enabled g-api; then
|
|
1438
|
|
- screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf"
|
|
|
1438
|
+ screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=$GLANCE_CONF_DIR/glance-api.conf"
|
|
1439
|
1439
|
echo "Waiting for g-api ($GLANCE_HOSTPORT) to start..."
|
|
1440
|
1440
|
if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- http://$GLANCE_HOSTPORT; do sleep 1; done"; then
|
|
1441
|
1441
|
echo "g-api did not start"
|