From 6d02d7e740396980cf4f36b3a623eea01155b6d2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 4 Jan 2016 16:53:42 +0100 Subject: NixOS tests: Increase hung_task_timeout_secs This hopefully fixes intermittent test failures like http://hydra.nixos.org/build/29962437 router# [ 240.128835] INFO: task mke2fs:99 blocked for more than 120 seconds. router# [ 240.130135] Not tainted 3.18.25 #1-NixOS router# [ 240.131110] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. assuming that these are caused by high load on the host. --- nixos/modules/system/boot/stage-1-init.sh | 1 + nixos/modules/system/boot/stage-1.nix | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'nixos/modules/system/boot') diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index 2b5d547353f8..7fb368e8c44f 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -140,6 +140,7 @@ done # Create device nodes in /dev. +@preDeviceCommands@ echo "running udev..." mkdir -p /etc/udev ln -sfn @udevRules@ /etc/udev/rules.d diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 58a0749c74e2..694a5cfb6f85 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -203,7 +203,7 @@ let inherit (config.boot) resumeDevice devSize runSize; inherit (config.boot.initrd) checkJournalingFS - postEarlyDeviceCommands preLVMCommands postDeviceCommands postMountCommands kernelModules; + preLVMCommands preDeviceCommands postEarlyDeviceCommands postDeviceCommands postMountCommands kernelModules; resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}") (filter (sd: (sd ? label || hasPrefix "/dev/" sd.device) && !sd.randomEncryption) config.swapDevices); @@ -303,6 +303,15 @@ in ''; }; + boot.initrd.preDeviceCommands = mkOption { + default = ""; + type = types.lines; + description = '' + Shell commands to be executed before udev is started to create + device nodes. + ''; + }; + boot.initrd.postDeviceCommands = mkOption { default = ""; type = types.lines; -- cgit 1.4.1