Browse Source

Be cleaner when unstacking a failed deployment

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

Change-Id: I679f42ee88f1e8ae6d656195f5377a8b06f1cee9
Eric Harney 6 months ago
parent
commit
ac2618ae8f
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      devstack/plugin.sh

+ 4
- 2
devstack/plugin.sh View File

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

Loading…
Cancel
Save