|
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 | 850 | } |
846 | 851 |
|
847 | 852 | # Copy over our glance configurations and update them |
848 | | - GLANCE_REGISTRY_CONF=$GLANCE_DIR/etc/glance-registry.conf |
| 853 | + GLANCE_REGISTRY_CONF=$GLANCE_CONF_DIR/glance-registry.conf |
849 | 854 | cp $FILES/glance-registry.conf $GLANCE_REGISTRY_CONF |
850 | 855 | glance_config $GLANCE_REGISTRY_CONF |
851 | 856 |
|
852 | 857 | if [[ -e $FILES/glance-registry-paste.ini ]]; then |
853 | | - GLANCE_REGISTRY_PASTE_INI=$GLANCE_DIR/etc/glance-registry-paste.ini |
| 858 | + GLANCE_REGISTRY_PASTE_INI=$GLANCE_CONF_DIR/glance-registry-paste.ini |
854 | 859 | cp $FILES/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI |
855 | 860 | glance_config $GLANCE_REGISTRY_PASTE_INI |
856 | 861 | fi |
857 | 862 |
|
858 | | - GLANCE_API_CONF=$GLANCE_DIR/etc/glance-api.conf |
| 863 | + GLANCE_API_CONF=$GLANCE_CONF_DIR/glance-api.conf |
859 | 864 | cp $FILES/glance-api.conf $GLANCE_API_CONF |
860 | 865 | glance_config $GLANCE_API_CONF |
861 | 866 |
|
862 | 867 | if [[ -e $FILES/glance-api-paste.ini ]]; then |
863 | | - GLANCE_API_PASTE_INI=$GLANCE_DIR/etc/glance-api-paste.ini |
| 868 | + GLANCE_API_PASTE_INI=$GLANCE_CONF_DIR/glance-api-paste.ini |
864 | 869 | cp $FILES/glance-api-paste.ini $GLANCE_API_PASTE_INI |
865 | 870 | glance_config $GLANCE_API_PASTE_INI |
866 | 871 | fi |
@@ -1426,12 +1431,12 @@ screen -r stack -X hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< |
1426 | 1431 |
|
1427 | 1432 | # launch the glance registry service |
1428 | 1433 | if is_service_enabled g-reg; then |
1429 | | - screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=etc/glance-registry.conf" |
| 1434 | + screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf" |
1430 | 1435 | fi |
1431 | 1436 |
|
1432 | 1437 | # launch the glance api and wait for it to answer before continuing |
1433 | 1438 | if is_service_enabled g-api; then |
1434 | | - screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf" |
| 1439 | + screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=$GLANCE_CONF_DIR/glance-api.conf" |
1435 | 1440 | echo "Waiting for g-api ($GLANCE_HOSTPORT) to start..." |
1436 | 1441 | if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- http://$GLANCE_HOSTPORT; do sleep 1; done"; then |
1437 | 1442 | echo "g-api did not start" |
|
0 commit comments