Be cleaner when unstacking a failed deployment

This prevents an error from "find" due to the
dir not existing.

Change-Id: I679f42ee88f1e8ae6d656195f5377a8b06f1cee9
This commit is contained in:
Eric Harney 2018-10-12 12:00:10 -04:00
parent 6d01740e27
commit ac2618ae8f
1 changed files with 4 additions and 2 deletions

View File

@ -109,8 +109,10 @@ fi
if [[ "$1" == "unstack" ]]; then
# Unmount any NFS shares mounted by Cinder
find ${DATA_DIR}/cinder/mnt -mindepth 1 -maxdepth 1 -type d \
| sudo xargs umount -l
if [[ -d ${DATA_DIR}/cinder/mnt ]]; then
find ${DATA_DIR}/cinder/mnt -mindepth 1 -maxdepth 1 -type d \
| sudo xargs umount -l
fi
sudo rm -f ${STACK_NFS_CONF}