We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06a3952 commit ed51e4dCopy full SHA for ed51e4d
bootstrap/src/scripts/boot_as_master
@@ -109,7 +109,17 @@ chmod 1777 /scratch
109
# Attach and mount /shared volume
110
RC=0
111
/usr/local/sbin/attachVolume.py ${cfn_volume} || RC=1
112
-sleep 10 # Hate having to do this...
+TRY=0
113
+while [ $TRY -lt 3 ]; do
114
+ sleep 10
115
+ stat /dev/disk/by-ebs-volumeid/${cfn_volume} 2>&1 >/dev/null
116
+ check_stat=$?
117
+ if [ $check_stat -eq 0 ]; then
118
+ break
119
+ else
120
+ TRY=$(( $TRY + 1 ))
121
+ fi
122
+done
123
dev=$(stat /dev/disk/by-ebs-volumeid/${cfn_volume}|grep -- 'File:'|awk '{print $4}'|cut -d'/' -f3|tr -d "'")
124
fs_type=$(blkid -o list | grep -- "$dev" | awk '{print $2}')
125
if [ "${fs_type}x" == "x" ]; then
0 commit comments