mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
nixos/slurm: fix startup of slurmd
* make slurmd depend on network target to ensure basic networking is available on startup. This fixes behaviour where slurmd fails with "error: get_addr_info: getaddrinfo() failed". * Use tmpfiles.d to ensure spool directory exists on start up.
This commit is contained in:
parent
67cc0b103a
commit
270da0a115
@ -362,6 +362,7 @@ in
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "systemd-tmpfiles-clean.service" ];
|
||||
requires = [ "network.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
@ -371,12 +372,12 @@ in
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
LimitMEMLOCK = "infinity";
|
||||
};
|
||||
|
||||
preStart = ''
|
||||
mkdir -p /var/spool
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = mkIf cfg.client.enable [
|
||||
"d /var/spool/slurmd 755 root root -"
|
||||
];
|
||||
|
||||
services.openssh.forwardX11 = mkIf cfg.client.enable (mkDefault true);
|
||||
|
||||
systemd.services.slurmctld = mkIf (cfg.server.enable) {
|
||||
|
Loading…
Reference in New Issue
Block a user