mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
Merge pull request #50862 from markuskowa/fix-slurm-module
nixos/slurm: set slurmd KillMode and add extraConfigPaths
This commit is contained in:
commit
9fba490258
@ -46,7 +46,7 @@ let
|
|||||||
# in the same directory as slurm.conf
|
# in the same directory as slurm.conf
|
||||||
etcSlurm = pkgs.symlinkJoin {
|
etcSlurm = pkgs.symlinkJoin {
|
||||||
name = "etc-slurm";
|
name = "etc-slurm";
|
||||||
paths = [ configFile cgroupConfig plugStackConfig ];
|
paths = [ configFile cgroupConfig plugStackConfig ] ++ cfg.extraConfigPaths;
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
@ -239,6 +239,17 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfigPaths = mkOption {
|
||||||
|
type = with types; listOf path;
|
||||||
|
default = [];
|
||||||
|
description = ''
|
||||||
|
Slurm expects config files for plugins in the same path
|
||||||
|
as <literal>slurm.conf</literal>. Add extra nix store
|
||||||
|
paths that should be merged into same directory as
|
||||||
|
<literal>slurm.conf</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -303,6 +314,7 @@ in
|
|||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "forking";
|
Type = "forking";
|
||||||
|
KillMode = "process";
|
||||||
ExecStart = "${wrappedSlurm}/bin/slurmd";
|
ExecStart = "${wrappedSlurm}/bin/slurmd";
|
||||||
PIDFile = "/run/slurmd.pid";
|
PIDFile = "/run/slurmd.pid";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
|
@ -63,6 +63,12 @@ in {
|
|||||||
ensurePermissions = { "slurm_acct_db.*" = "ALL PRIVILEGES"; };
|
ensurePermissions = { "slurm_acct_db.*" = "ALL PRIVILEGES"; };
|
||||||
name = "slurm";
|
name = "slurm";
|
||||||
}];
|
}];
|
||||||
|
extraOptions = ''
|
||||||
|
# recommendations from: https://slurm.schedmd.com/accounting.html#mysql-configuration
|
||||||
|
innodb_buffer_pool_size=1024M
|
||||||
|
innodb_log_file_size=64M
|
||||||
|
innodb_lock_wait_timeout=900
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -95,6 +101,7 @@ in {
|
|||||||
subtest "can_start_slurmdbd", sub {
|
subtest "can_start_slurmdbd", sub {
|
||||||
$dbd->succeed("systemctl restart slurmdbd");
|
$dbd->succeed("systemctl restart slurmdbd");
|
||||||
$dbd->waitForUnit("slurmdbd.service");
|
$dbd->waitForUnit("slurmdbd.service");
|
||||||
|
$dbd->waitForOpenPort(6819);
|
||||||
};
|
};
|
||||||
|
|
||||||
# there needs to be an entry for the current
|
# there needs to be an entry for the current
|
||||||
|
Loading…
Reference in New Issue
Block a user