summary refs log tree commit diff
path: root/nixos/modules/testing
diff options
context:
space:
mode:
authorBrian Olsen <brian@maven-group.org>2018-08-29 12:12:12 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-08-29 12:12:12 +0200
commit9540b1c5357acd63f89c985a85faee79bf28d902 (patch)
treec0709a2cf99cdedc730f23363ce77dbdbcbc8112 /nixos/modules/testing
parentb0d4c25c1c66ec4b0394bae3ea4890e02cb00402 (diff)
downloadnixlib-9540b1c5357acd63f89c985a85faee79bf28d902.tar
nixlib-9540b1c5357acd63f89c985a85faee79bf28d902.tar.gz
nixlib-9540b1c5357acd63f89c985a85faee79bf28d902.tar.bz2
nixlib-9540b1c5357acd63f89c985a85faee79bf28d902.tar.lz
nixlib-9540b1c5357acd63f89c985a85faee79bf28d902.tar.xz
nixlib-9540b1c5357acd63f89c985a85faee79bf28d902.tar.zst
nixlib-9540b1c5357acd63f89c985a85faee79bf28d902.zip
nixos/tests: Set DefaultTimeoutStartSec very high (#44916)
DefaultTimeoutStartSec is normally set to 90 seconds and works fine. But
when running NixOS tests on a very slow machine (like a VM without
nested virtualisation support) this default is to low and causes
systemd units to fail spuriously. One symptom of this issue are tests
at times failing with "timed out waiting for the VM to connect".

Since the VM connect timeout is 300 seconds I also set
DefaultTimeoutStartSec to this which is ridiculously high.
Diffstat (limited to 'nixos/modules/testing')
-rw-r--r--nixos/modules/testing/test-instrumentation.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix
index d94e21d681f3..ed4cfa7805e2 100644
--- a/nixos/modules/testing/test-instrumentation.nix
+++ b/nixos/modules/testing/test-instrumentation.nix
@@ -102,8 +102,12 @@ with import ../../lib/qemu-flags.nix { inherit pkgs; };
         MaxLevelConsole=debug
       '';
 
-    # Don't clobber the console with duplicate systemd messages.
-    systemd.extraConfig = "ShowStatus=no";
+    systemd.extraConfig = ''
+      # Don't clobber the console with duplicate systemd messages.
+      ShowStatus=no
+      # Allow very slow start
+      DefaultTimeoutStartSec=300
+    '';
 
     boot.consoleLogLevel = 7;