summary refs log tree commit diff
path: root/nixos/modules/services/computing/slurm/slurm.nix
diff options
context:
space:
mode:
authorMarkus Kowalewski <markus.kowalewski@fysik.su.se>2018-11-06 13:04:42 +0100
committerMarkus Kowalewski <markus.kowalewski@gmail.com>2018-11-20 22:26:42 +0100
commitae93ed0f0d4e7be0a286d1fca86446318c0c6ffb (patch)
tree328950e02ac7c33e75877495304c07b2f8f770da /nixos/modules/services/computing/slurm/slurm.nix
parent0e98312b72b3c4a789b08ce45b037611140a323e (diff)
downloadnixpkgs-ae93ed0f0d4e7be0a286d1fca86446318c0c6ffb.tar
nixpkgs-ae93ed0f0d4e7be0a286d1fca86446318c0c6ffb.tar.gz
nixpkgs-ae93ed0f0d4e7be0a286d1fca86446318c0c6ffb.tar.bz2
nixpkgs-ae93ed0f0d4e7be0a286d1fca86446318c0c6ffb.tar.lz
nixpkgs-ae93ed0f0d4e7be0a286d1fca86446318c0c6ffb.tar.xz
nixpkgs-ae93ed0f0d4e7be0a286d1fca86446318c0c6ffb.tar.zst
nixpkgs-ae93ed0f0d4e7be0a286d1fca86446318c0c6ffb.zip
nixos/slurm: set slurmd KillMode to process
The default of systemd is to kill the
the whole cgroup of a service. For slurmd
this means that all running jobs get killed
as well whenever the configuration is updated (and activated).

To avoid this behaviour we set "KillMode=process"
to kill only slurmd on reload. This is how
slurm configures the systemd service.

See:
https://bugs.schedmd.com/show_bug.cgi?id=2095#c24
https://github.com/SchedMD/slurm/commit/508f866ea10e4c359d62d443279198082d587107
Diffstat (limited to 'nixos/modules/services/computing/slurm/slurm.nix')
-rw-r--r--nixos/modules/services/computing/slurm/slurm.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/computing/slurm/slurm.nix b/nixos/modules/services/computing/slurm/slurm.nix
index cd481212db2..cd1b6264fa9 100644
--- a/nixos/modules/services/computing/slurm/slurm.nix
+++ b/nixos/modules/services/computing/slurm/slurm.nix
@@ -303,6 +303,7 @@ in
 
       serviceConfig = {
         Type = "forking";
+        KillMode = "process";
         ExecStart = "${wrappedSlurm}/bin/slurmd";
         PIDFile = "/run/slurmd.pid";
         ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";