From 9540b1c5357acd63f89c985a85faee79bf28d902 Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Wed, 29 Aug 2018 12:12:12 +0200 Subject: [PATCH] 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. --- nixos/modules/testing/test-instrumentation.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix index d94e21d681f..ed4cfa7805e 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;