summary refs log tree commit diff
path: root/nixos/tests/containers-imperative.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-08-02 05:32:39 +0200
committeraszlig <aszlig@nix.build>2018-08-02 06:00:32 +0200
commit6f5a86b189fcaaee88aa421cc7639461bb07d59e (patch)
tree9fc74eb2ac4b45f603eebc61dc514a7607724a39 /nixos/tests/containers-imperative.nix
parent00ab5c5b6af27850268e2cb29479fd54d67b5e02 (diff)
downloadnixpkgs-6f5a86b189fcaaee88aa421cc7639461bb07d59e.tar
nixpkgs-6f5a86b189fcaaee88aa421cc7639461bb07d59e.tar.gz
nixpkgs-6f5a86b189fcaaee88aa421cc7639461bb07d59e.tar.bz2
nixpkgs-6f5a86b189fcaaee88aa421cc7639461bb07d59e.tar.lz
nixpkgs-6f5a86b189fcaaee88aa421cc7639461bb07d59e.tar.xz
nixpkgs-6f5a86b189fcaaee88aa421cc7639461bb07d59e.tar.zst
nixpkgs-6f5a86b189fcaaee88aa421cc7639461bb07d59e.zip
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 <aszlig@nix.build>
Issue: https://github.com/NixOS/nix/issues/2324
Cc: @aristidb, @edolstra, @chaoflow, @kampfschlaefer
Diffstat (limited to 'nixos/tests/containers-imperative.nix')
-rw-r--r--nixos/tests/containers-imperative.nix5
1 files changed, 5 insertions, 0 deletions
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