Merge branch 'fix-nixos-test-failures'

This fixes #10828 by removing the msize option and also disabling the
writeback cache for the root file system of the test machines.

I've tested this across 5 evaluations on my Hydra, where I run tests for
specific machine configurations:

https://headcounter.org/hydra/eval/304437?filter=tests
https://headcounter.org/hydra/eval/304438?filter=tests
https://headcounter.org/hydra/eval/304439?filter=tests
https://headcounter.org/hydra/eval/304440?filter=tests
https://headcounter.org/hydra/eval/304441?filter=tests

So to summarize on the test failures:

Eval    Test failures
304437  quake3, virtualbox
304438
304439  virtualbox
304440  virtualbox
304441

Both the quake3 and virtualbox test failures are unrelated to this merge
and I didn't have to cancel or restart any other jobs. The only jobs I
really had to cancel were the virtualbox jobs, so we no longer should
have "hanging" jobs in the queue due to page allocation failures of the
9p shares.

This is in controst to every evaluation before 304437, where I needed to
constantly restart VM tests.

Thanks a lot to @wizeman for finding the original issue and to
@domenkozar and @lethalman for testing and additional findings (such as
the issue with the cache option).
This commit is contained in:
aszlig 2015-12-14 19:31:48 +01:00
commit 90997daab6
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961
4 changed files with 9 additions and 13 deletions

@ -88,10 +88,6 @@ let kernel = config.boot.kernelPackages.kernel; in
boot.consoleLogLevel = 7;
# Make sure we don't hit page allocation failures if the VM's memory is
# heavily fragmented.
boot.kernel.sysctl."vm.min_free_kbytes" = 16384;
# Prevent tests from accessing the Internet.
networking.defaultGateway = mkOverride 150 "";
networking.nameservers = mkOverride 150 [ ];

@ -76,14 +76,14 @@ let
-virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \
-virtfs local,path=''${SHARED_DIR:-$TMPDIR/xchg},security_model=none,mount_tag=shared \
${if cfg.useBootLoader then ''
-drive index=0,id=drive1,file=$NIX_DISK_IMAGE,if=${cfg.qemu.diskInterface},cache=writeback,werror=report \
-drive index=0,id=drive1,file=$NIX_DISK_IMAGE,if=${cfg.qemu.diskInterface},cache=none,werror=report \
-drive index=1,id=drive2,file=$TMPDIR/disk.img,media=disk \
${if cfg.useEFIBoot then ''
-pflash $TMPDIR/bios.bin \
'' else ''
''}
'' else ''
-drive index=0,id=drive1,file=$NIX_DISK_IMAGE,if=${cfg.qemu.diskInterface},cache=writeback,werror=report \
-drive index=0,id=drive1,file=$NIX_DISK_IMAGE,if=${cfg.qemu.diskInterface},cache=none,werror=report \
-kernel ${config.system.build.toplevel}/kernel \
-initrd ${config.system.build.toplevel}/initrd \
-append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo} ${kernelConsole} $QEMU_KERNEL_PARAMS" \
@ -426,19 +426,19 @@ in
${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
{ device = "store";
fsType = "9p";
options = "trans=virtio,version=9p2000.L,msize=1048576,cache=loose";
options = "trans=virtio,version=9p2000.L,cache=loose";
neededForBoot = true;
};
"/tmp/xchg" =
{ device = "xchg";
fsType = "9p";
options = "trans=virtio,version=9p2000.L,msize=1048576,cache=loose";
options = "trans=virtio,version=9p2000.L,cache=loose";
neededForBoot = true;
};
"/tmp/shared" =
{ device = "shared";
fsType = "9p";
options = "trans=virtio,version=9p2000.L,msize=1048576";
options = "trans=virtio,version=9p2000.L";
neededForBoot = true;
};
} // optionalAttrs cfg.writableStore

@ -118,7 +118,7 @@ rec {
echo "mounting Nix store..."
mkdir -p /fs/nix/store
mount -t 9p store /fs/nix/store -o trans=virtio,version=9p2000.L,msize=262144,cache=loose
mount -t 9p store /fs/nix/store -o trans=virtio,version=9p2000.L,cache=loose
mkdir -p /fs/tmp /fs/run /fs/var
mount -t tmpfs -o "mode=1777" none /fs/tmp
@ -127,7 +127,7 @@ rec {
echo "mounting host's temporary directory..."
mkdir -p /fs/tmp/xchg
mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,msize=262144,cache=loose
mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,cache=loose
mkdir -p /fs/proc
mount -t proc none /fs/proc

@ -48,11 +48,11 @@ let
mount -t proc none /fs/proc
mount -t 9p \
-o trans=virtio,version=9p2000.L,msize=262144,cache=loose \
-o trans=virtio,version=9p2000.L,cache=loose \
store /fs/nix/store
mount -t 9p \
-o trans=virtio,version=9p2000.L,msize=262144,cache=loose \
-o trans=virtio,version=9p2000.L,cache=loose \
xchg /fs/xchg
echo root:x:0:0::/root:/bin/false > /fs/etc/passwd