diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-06-20 20:52:08 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-06-20 20:52:08 +0000 |
commit | cb5bcfa04a6fdf3756cf760af6238d928c060ceb (patch) | |
tree | 637daa36578c65a9fa20ef1d3325110f537a1746 /pkgs/build-support | |
parent | ee1718380d553622bf1934b03032ced8d5e58060 (diff) |
* In the VM tests, apply a patch to increase the 15s timeout on CIFS
operations to 120s. This is necessary if the host is heavily loaded. For instance, in the Hydra build farm, if there are many concurrent jobs, VM builds often fail because they hit the timeout. svn path=/nixpkgs/trunk/; revision=22347
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/vm/default.nix | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index e4eb993fbf1c6..50083ca688ff4 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -4,7 +4,12 @@ with pkgs; rec { - inherit (linuxPackages_2_6_32) kernel; + # The 15 second CIFS timeout is too short if the host if heavily + # loaded (e.g., in the Hydra build farm when it's running many jobs + # in parallel). So apply a patch to increase the timeout to 120s. + kernel = pkgs.linux.override (orig: { + kernelPatches = orig.kernelPatches ++ [ kernelPatches.cifs_timeout ]; + }); kvm = pkgs.qemu_kvm; @@ -135,10 +140,8 @@ rec { mkdir -p /fs/dev mount -o bind /dev /fs/dev - for ((n = 0; n < 10; n++)); do - echo "mounting host filesystem, attempt $n..." - mount -t cifs //10.0.2.4/qemu /fs/hostfs -o guest,username=nobody && break - done + echo "mounting host filesystem..." + mount -t cifs //10.0.2.4/qemu /fs/hostfs -o guest,username=nobody mkdir -p /fs/nix/store mount -o bind /fs/hostfs/nix/store /fs/nix/store @@ -225,7 +228,6 @@ rec { startSamba = - let sambaScript = writeScript "run-smbd" "while ${samba}/sbin/smbd -s $TMPDIR/smb.conf; do true; done"; in '' cat > $TMPDIR/smb.conf <<SMB [global] @@ -244,7 +246,7 @@ rec { SMB rm -f ./samba - ${socat}/bin/socat unix-listen:./samba exec:'/bin/sh -c ${sambaScript}',nofork > /dev/null 2>&1 & + ${socat}/bin/socat unix-listen:./samba exec:'${samba}/sbin/smbd -s $TMPDIR/smb.conf',nofork > /dev/null 2>&1 & while [ ! -e ./samba ]; do sleep 0.1; done # ugly ''; |