From 7f8710d2d720d64009bc812910c5b015240c67c8 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sat, 22 Feb 2020 21:12:50 +0100 Subject: [PATCH] Added a sleep before mounting. Added an error message on mount error. --- start_or_update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/start_or_update.sh b/start_or_update.sh index 0b41075..12d6803 100755 --- a/start_or_update.sh +++ b/start_or_update.sh @@ -8,7 +8,9 @@ do then VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show ${VOLUME} -c id --format value) test -e /dev/disk/by-id/*${VOLUME_ID:0:20} || nova volume-attach $INSTANCE $VOLUME_ID auto + sleep 3 sudo mount /dev/disk/by-id/*${VOLUME_ID:0:20} /mnt/volumes/${VOLUME} + mountpoint -q /mnt/volumes/${VOLUME} || { echo "ERROR: could not mount /mnt/volumes/${VOLUME}, exiting."; exit 1; } fi done