Skip to content

Commit 7398f94

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "move glance conf dir to /etc/glance"
2 parents 3d64b2c + 0ddcae6 commit 7398f94

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
@@ -1430,12 +1435,12 @@ screen -r stack -X hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<
14301435

14311436
# launch the glance registry service
14321437
if is_service_enabled g-reg; then
1433-
screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=etc/glance-registry.conf"
1438+
screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf"
14341439
fi
14351440

14361441
# launch the glance api and wait for it to answer before continuing
14371442
if is_service_enabled g-api; then
1438-
screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf"
1443+
screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=$GLANCE_CONF_DIR/glance-api.conf"
14391444
echo "Waiting for g-api ($GLANCE_HOSTPORT) to start..."
14401445
if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- http://$GLANCE_HOSTPORT; do sleep 1; done"; then
14411446
echo "g-api did not start"

0 commit comments

Comments
 (0)