summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Harney <eharney@redhat.com>2018-10-12 12:00:10 -0400
committerEric Harney <eharney@redhat.com>2018-10-12 12:00:10 -0400
commitac2618ae8f6c94ce71cd88e7f665176d2bc6a35f (patch)
tree4fc9f1d6904acb98f8ce95dbd231d87385d7e701
parent6d01740e272c3c63f5e1db98f20a2aa9d90779c8 (diff)
Be cleaner when unstacking a failed deployment
This prevents an error from "find" due to the dir not existing. Change-Id: I679f42ee88f1e8ae6d656195f5377a8b06f1cee9
Notes
Notes (review): Code-Review+1: Sofia Enriquez <lsofia.enriquez@gmail.com> Code-Review+2: Eric Harney <eharney@redhat.com> Workflow+1: Eric Harney <eharney@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 23 Oct 2018 14:24:11 +0000 Reviewed-on: https://review.openstack.org/610095 Project: openstack/devstack-plugin-nfs Branch: refs/heads/master
-rw-r--r--devstack/plugin.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index cc21c28..980047e 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -109,8 +109,10 @@ fi
109 109
110if [[ "$1" == "unstack" ]]; then 110if [[ "$1" == "unstack" ]]; then
111 # Unmount any NFS shares mounted by Cinder 111 # Unmount any NFS shares mounted by Cinder
112 find ${DATA_DIR}/cinder/mnt -mindepth 1 -maxdepth 1 -type d \ 112 if [[ -d ${DATA_DIR}/cinder/mnt ]]; then
113 | sudo xargs umount -l 113 find ${DATA_DIR}/cinder/mnt -mindepth 1 -maxdepth 1 -type d \
114 | sudo xargs umount -l
115 fi
114 116
115 sudo rm -f ${STACK_NFS_CONF} 117 sudo rm -f ${STACK_NFS_CONF}
116 118