From 6f5a86b189fcaaee88aa421cc7639461bb07d59e Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 2 Aug 2018 05:32:39 +0200 Subject: tests/containers-imperative: Disable useSandbox Since 4f6df27aee0a3f620d65280c7b6644d5cce094ae, nix.useSandbox defaults to true which causes the Nix build within the containers-imperative test to fail while trying to hardlink files into the chroot: link("/nix/store/foo", "/nix/store/bar.drv.chroot/nix/store/foo") = -1 EPERM (Operation not permitted) The reason this happens is that the hosts store is mounted using 9p and an overlayfs is mounted on top, so even if we would disable the tmpfs for the upper directory the hardlink would still cross filesystem boundaries, which then fails with the above error code. I haven't yet seen any other test which fails in a similar way, which might be because building within VM tests is not very common and the installer tests build in a separate store, so they're not affected. Signed-off-by: aszlig Issue: https://github.com/NixOS/nix/issues/2324 Cc: @aristidb, @edolstra, @chaoflow, @kampfschlaefer --- nixos/tests/containers-imperative.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nixos/tests/containers-imperative.nix') diff --git a/nixos/tests/containers-imperative.nix b/nixos/tests/containers-imperative.nix index 93b00b5b977..913d8bed19d 100644 --- a/nixos/tests/containers-imperative.nix +++ b/nixos/tests/containers-imperative.nix @@ -9,6 +9,11 @@ import ./make-test.nix ({ pkgs, ...} : { machine = { config, pkgs, lib, ... }: { imports = [ ../modules/installer/cd-dvd/channel.nix ]; + + # XXX: Sandbox setup fails while trying to hardlink files from the host's + # store file system into the prepared chroot directory. + nix.useSandbox = false; + virtualisation.writableStore = true; virtualisation.memorySize = 1024; # Make sure we always have all the required dependencies for creating a -- cgit 1.4.1