Browse code

remove clouds.yaml in clean.sh

devstack failed to install because glance:
Could not determine a suitable URL for the plugin

patch I618ea8e27b49af360c905df85af06d9b1eef8407 tries
to fix this problem, but with a wrong way because path is not
correct, the clouds.yaml is not under /path/to/devstack/~/.config/openstack/
but ~/.config/openstack.

patch I8af6bd465f74099c560dddba6b5221dd79cbc965 tries to
fix this problem, but with a worng way to specify the path,
~$STACK_USER/.config/openstack/clouds.yaml will not expand with
a variable, only const string can.

$ whoami
zqfan
$ touch ~/.config/openstack/clouds.yaml
$ export STACK_USER=zqfan
$ rm -rf ~$STACK_USER/.config/openstack/clouds.yaml
$ ls ~/.config/openstack/
clouds.yaml

Change-Id: I549817d2f4638be615991c1726b39d270ba71357
ref: I618ea8e27b49af360c905df85af06d9b1eef8407

ZhiQiang Fan authored on 2016/04/12 21:26:33
Showing 2 changed files
... ...
@@ -137,9 +137,10 @@ rm -rf $DIRS_TO_CLEAN
137 137
 FILES_TO_CLEAN=".localrc.auto .localrc.password "
138 138
 FILES_TO_CLEAN+="docs/files docs/html shocco/ "
139 139
 FILES_TO_CLEAN+="stack-screenrc test*.conf* test.ini* "
140
-FILES_TO_CLEAN+=".stackenv .prereqs "
141
-FILES_TO_CLEAN+="~/.config/openstack"
140
+FILES_TO_CLEAN+=".stackenv .prereqs"
142 141
 
143 142
 for file in $FILES_TO_CLEAN; do
144 143
     rm -rf $TOP_DIR/$file
145 144
 done
145
+
146
+rm -rf ~/.config/openstack
... ...
@@ -123,7 +123,7 @@ function write_clouds_yaml {
123 123
         --os-project-name admin
124 124
 
125 125
     # CLean up any old clouds.yaml files we had laying around
126
-    rm -f ~$STACK_USER/.config/openstack/clouds.yaml
126
+    rm -f $(eval echo ~"$STACK_USER")/.config/openstack/clouds.yaml
127 127
 }
128 128
 
129 129
 # trueorfalse <True|False> <VAR>