From 0b4a009e56d29e4fe51ae06132c5766d0da9be7d Mon Sep 17 00:00:00 2001 From: ZhiQiang Fan Date: Tue, 12 Apr 2016 20:26:33 +0800 Subject: [PATCH] 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 --- clean.sh | 5 +++-- functions-common | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/clean.sh b/clean.sh index b18f28ec28..1176134da6 100755 --- a/clean.sh +++ b/clean.sh @@ -137,9 +137,10 @@ rm -rf $DIRS_TO_CLEAN FILES_TO_CLEAN=".localrc.auto .localrc.password " FILES_TO_CLEAN+="docs/files docs/html shocco/ " FILES_TO_CLEAN+="stack-screenrc test*.conf* test.ini* " -FILES_TO_CLEAN+=".stackenv .prereqs " -FILES_TO_CLEAN+="~/.config/openstack" +FILES_TO_CLEAN+=".stackenv .prereqs" for file in $FILES_TO_CLEAN; do rm -rf $TOP_DIR/$file done + +rm -rf ~/.config/openstack diff --git a/functions-common b/functions-common index 0806681c3b..a4711ddc58 100644 --- a/functions-common +++ b/functions-common @@ -123,7 +123,7 @@ function write_clouds_yaml { --os-project-name admin # CLean up any old clouds.yaml files we had laying around - rm -f ~$STACK_USER/.config/openstack/clouds.yaml + rm -f $(eval echo ~"$STACK_USER")/.config/openstack/clouds.yaml } # trueorfalse