diff --git a/playbooks/roles/airship-configure-worker/templates/caasp_worker_node_set_subvolumes.sh.j2 b/playbooks/roles/airship-configure-worker/templates/caasp_worker_node_set_subvolumes.sh.j2 index c1cb699bb..72569c178 100644 --- a/playbooks/roles/airship-configure-worker/templates/caasp_worker_node_set_subvolumes.sh.j2 +++ b/playbooks/roles/airship-configure-worker/templates/caasp_worker_node_set_subvolumes.sh.j2 @@ -41,10 +41,11 @@ restore_and_reboot() { delete_subvolume(){ if [ -d "$1" ]; then init - devpath=$(grep $1 /proc/mounts | awk '{print $1}') - mount $devpath $2 -o subvol="/@" - btrfs subvolume delete "$2/$1" || true - umount "$2" || true + if devpath=$(grep $1 /proc/mounts | awk '{print $1}') ; then + mount $devpath $2 -o subvol="/@" + btrfs subvolume delete "$2/$1" || true + umount "$2" || true + fi fi }