diff options
author | Simon Rettberg | 2016-05-11 16:41:00 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-05-11 16:41:00 +0200 |
commit | 1256e1d60c964e8798e0802508aa458ec2d5b3f6 (patch) | |
tree | 88837b58a1026f0cf9cccc4e6780a5ef900338e5 | |
parent | [run-virt] Linux-VMs fd1: Slightly more explicit logging (little change) (diff) | |
download | tm-scripts-1256e1d60c964e8798e0802508aa458ec2d5b3f6.tar.gz tm-scripts-1256e1d60c964e8798e0802508aa458ec2d5b3f6.tar.xz tm-scripts-1256e1d60c964e8798e0802508aa458ec2d5b3f6.zip |
[run-virt] Fallback to nfs3 if auto-detect (usually 4) doesn't work
-rwxr-xr-x | remote/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store | 8 |
1 files 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 |