From 1256e1d60c964e8798e0802508aa458ec2d5b3f6 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 11 May 2016 16:41:00 +0200 Subject: [run-virt] Fallback to nfs3 if auto-detect (usually 4) doesn't work --- .../run-virt/data/opt/openslx/scripts/systemd-mount_vm_store | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/remote/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store b/remote/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store index 9d478918..363e5253 100755 --- a/remote/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store +++ b/remote/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store @@ -13,8 +13,12 @@ OUTFILE=$(mktemp) # no bash, so this is a bit ugly... if [ "${SLX_VM_NFS#//}" = "${SLX_VM_NFS}" ]; then # doesn't start with '//' -> assume NFS - /opt/openslx/bin/timeout -t 10 -s 9 mount -v -t nfs -o ro,async,nolock "$SLX_VM_NFS" /mnt/vmstore + /opt/openslx/bin/timeout -t 6 -s 9 mount -v -t nfs -o ro,async,nolock "$SLX_VM_NFS" /mnt/vmstore RET=$? + if [ "$RET" != "0" ]; then + /opt/openslx/bin/timeout -t 6 -s 9 mount -v -t nfs -o vers=3,ro,async,nolock "$SLX_VM_NFS" /mnt/vmstore + RET=$? + fi else # starts with '//' -> assume CIFS export USER="$SLX_VM_NFS_USER" @@ -25,7 +29,7 @@ else RET=$? fi > "$OUTFILE" 2>&1 -if [ $RET -ne 0 ]; then +if [ "$RET" -ne "0" ]; then if [ -s "$OUTFILE" ]; then slxlog "mount-vmstore-fail" "Mounting '$SLX_VM_NFS' failed. VMs will not boot." "$OUTFILE" sleep 1 -- cgit v1.2.3-55-g7522