Skip to content

Commit 0ddcae6

Browse files
author
Yong Sheng Gong
committed
move glance conf dir to /etc/glance
bug 959735 Change-Id: I0593790fda6c2f3c9af7a8c930234d21e4acf643
1 parent bd07d61 commit 0ddcae6

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ Todd Willey <xtoddx@gmail.com>
2626
Tres Henry <tres@treshenry.net>
2727
Vishvananda Ishaya <vishvananda@gmail.com>
2828
Yun Mao <yunmao@gmail.com>
29+
Yong Sheng Gong <gongysh@cn.ibm.com>
2930
Zhongyue Luo <lzyeval@gmail.com>

stack.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,11 @@ fi
814814
# ------
815815

816816
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
817822
GLANCE_IMAGE_DIR=$DEST/glance/images
818823
# Delete existing images
819824
rm -rf $GLANCE_IMAGE_DIR
@@ -845,22 +850,22 @@ if is_service_enabled g-reg; then
845850
}
846851

847852
# 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
849854
cp $FILES/glance-registry.conf $GLANCE_REGISTRY_CONF
850855
glance_config $GLANCE_REGISTRY_CONF
851856

852857
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
854859
cp $FILES/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI
855860
glance_config $GLANCE_REGISTRY_PASTE_INI
856861
fi
857862

858-
GLANCE_API_CONF=$GLANCE_DIR/etc/glance-api.conf
863+
GLANCE_API_CONF=$GLANCE_CONF_DIR/glance-api.conf
859864
cp $FILES/glance-api.conf $GLANCE_API_CONF
860865
glance_config $GLANCE_API_CONF
861866

862867
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
864869
cp $FILES/glance-api-paste.ini $GLANCE_API_PASTE_INI
865870
glance_config $GLANCE_API_PASTE_INI
866871
fi
@@ -1426,12 +1431,12 @@ screen -r stack -X hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<
14261431

14271432
# launch the glance registry service
14281433
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"
14301435
fi
14311436

14321437
# launch the glance api and wait for it to answer before continuing
14331438
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"
14351440
echo "Waiting for g-api ($GLANCE_HOSTPORT) to start..."
14361441
if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- http://$GLANCE_HOSTPORT; do sleep 1; done"; then
14371442
echo "g-api did not start"

0 commit comments

Comments
 (0)