From 2a14e898bcf5ed9e6647f3b60c0444adba18a9ce Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Tue, 22 May 2018 13:55:13 +0200 Subject: [PATCH 1/3] slurm/module: add ProcTrackType option to unbreak default setup --- nixos/modules/services/computing/slurm/slurm.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nixos/modules/services/computing/slurm/slurm.nix b/nixos/modules/services/computing/slurm/slurm.nix index 45d34f5b76f..314cc3f61ec 100644 --- a/nixos/modules/services/computing/slurm/slurm.nix +++ b/nixos/modules/services/computing/slurm/slurm.nix @@ -13,6 +13,7 @@ let ${optionalString (cfg.nodeName != null) ''nodeName=${cfg.nodeName}''} ${optionalString (cfg.partitionName != null) ''partitionName=${cfg.partitionName}''} PlugStackConfig=${plugStackConfig} + ProctrackType=${cfg.procTrackType} ${cfg.extraConfig} ''; @@ -103,6 +104,16 @@ in ''; }; + procTrackType = mkOption { + type = types.string; + default = "proctrack/linuxproc"; + description = '' + Plugin to be used for process tracking on a job step basis. + The slurmd daemon uses this mechanism to identify all processes + which are children of processes it spawns for a user job step. + ''; + }; + extraConfig = mkOption { default = ""; type = types.lines; From fb7428c50613a0f9e0d8ebc714abebee4e5d5cd2 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 24 May 2018 11:10:20 +0200 Subject: [PATCH 2/3] nixos/slurm: enable munge by default, added note to slurm description --- nixos/modules/services/computing/slurm/slurm.nix | 16 +++++++++++++--- nixos/tests/slurm.nix | 2 -- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/computing/slurm/slurm.nix b/nixos/modules/services/computing/slurm/slurm.nix index 314cc3f61ec..25df5030162 100644 --- a/nixos/modules/services/computing/slurm/slurm.nix +++ b/nixos/modules/services/computing/slurm/slurm.nix @@ -32,12 +32,20 @@ in services.slurm = { server = { - enable = mkEnableOption "slurm control daemon"; - + enable = mkOption { + type = types.bool; + default = false; + description = '' + Wether to enable the slurm control daemon. + Note that the standard authentication method is "munge". + The "munge" service needs to be provided with a password file in order for + slurm to work properly (see services.munge.password). + ''; + }; }; client = { - enable = mkEnableOption "slurm rlient daemon"; + enable = mkEnableOption "slurm client daemon"; }; @@ -161,6 +169,8 @@ in environment.systemPackages = [ wrappedSlurm ]; + services.munge.enable = mkDefault true; + systemd.services.slurmd = mkIf (cfg.client.enable) { path = with pkgs; [ wrappedSlurm coreutils ] ++ lib.optional cfg.enableSrunX11 slurm-spank-x11; diff --git a/nixos/tests/slurm.nix b/nixos/tests/slurm.nix index 0dd00dfb04c..dc4f62af564 100644 --- a/nixos/tests/slurm.nix +++ b/nixos/tests/slurm.nix @@ -20,7 +20,6 @@ in { # TODO slrumd port and slurmctld port should be configurations and # automatically allowed by the firewall. networking.firewall.enable = false; - services.munge.enable = true; services.slurm = slurmconfig; }; in { @@ -28,7 +27,6 @@ in { { config, pkgs, ...}: { networking.firewall.enable = false; - services.munge.enable = true; services.slurm = { server.enable = true; } // slurmconfig; From 96e5a8bce27c87d9a9e7999368d5c843d7a19049 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 24 May 2018 14:46:56 +0200 Subject: [PATCH 3/3] nixos/slurm: add slurm test to release.nix --- nixos/release.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/release.nix b/nixos/release.nix index f7c2943b96f..8d9202e87b0 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -383,6 +383,7 @@ in rec { tests.sddm = callSubTests tests/sddm.nix {}; tests.simple = callTest tests/simple.nix {}; tests.slim = callTest tests/slim.nix {}; + tests.slurm = callTest tests/slurm.nix {}; tests.smokeping = callTest tests/smokeping.nix {}; tests.snapper = callTest tests/snapper.nix {}; tests.statsd = callTest tests/statsd.nix {};