0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Revert "kea: use separate runtime directories for each service"

This reverts commit 413011ddf4.

Using separate lockfile directories prevents the different kea daemons
from using the interprocess sync lockfile.

Keeping the runtime directory around might be the better approach.
This commit is contained in:
Martin Weinelt 2023-12-15 13:51:19 +01:00
parent 9bcc22403c
commit cd6ccb1737
3 changed files with 13 additions and 16 deletions

View file

@ -15,8 +15,8 @@ in {
type = types.listOf types.str; type = types.listOf types.str;
example = literalExpression '' example = literalExpression ''
[ [
"/run/kea-dhcp4/kea-dhcp4.socket" "/run/kea/kea-dhcp4.socket"
"/run/kea-dhcp6/kea-dhcp6.socket" "/run/kea/kea-dhcp6.socket"
] ]
''; '';
description = lib.mdDoc '' description = lib.mdDoc ''

View file

@ -254,6 +254,7 @@ in
DynamicUser = true; DynamicUser = true;
User = "kea"; User = "kea";
ConfigurationDirectory = "kea"; ConfigurationDirectory = "kea";
RuntimeDirectory = "kea";
StateDirectory = "kea"; StateDirectory = "kea";
UMask = "0077"; UMask = "0077";
}; };
@ -288,8 +289,8 @@ in
]; ];
environment = { environment = {
KEA_PIDFILE_DIR = "/run/kea-ctrl-agent"; KEA_PIDFILE_DIR = "/run/kea";
KEA_LOCKFILE_DIR = "/run/kea-ctrl-agent"; KEA_LOCKFILE_DIR = "/run/kea";
}; };
restartTriggers = [ restartTriggers = [
@ -300,7 +301,6 @@ in
ExecStart = "${package}/bin/kea-ctrl-agent -c /etc/kea/ctrl-agent.conf ${lib.escapeShellArgs cfg.ctrl-agent.extraArgs}"; ExecStart = "${package}/bin/kea-ctrl-agent -c /etc/kea/ctrl-agent.conf ${lib.escapeShellArgs cfg.ctrl-agent.extraArgs}";
KillMode = "process"; KillMode = "process";
Restart = "on-failure"; Restart = "on-failure";
RuntimeDirectory = "kea-ctrl-agent";
} // commonServiceConfig; } // commonServiceConfig;
}; };
}) })
@ -329,8 +329,8 @@ in
]; ];
environment = { environment = {
KEA_PIDFILE_DIR = "/run/kea-dhcp4"; KEA_PIDFILE_DIR = "/run/kea";
KEA_LOCKFILE_DIR = "/run/kea-dhcp4"; KEA_LOCKFILE_DIR = "/run/kea";
}; };
restartTriggers = [ restartTriggers = [
@ -348,7 +348,6 @@ in
"CAP_NET_BIND_SERVICE" "CAP_NET_BIND_SERVICE"
"CAP_NET_RAW" "CAP_NET_RAW"
]; ];
RuntimeDirectory = "kea-dhcp4";
} // commonServiceConfig; } // commonServiceConfig;
}; };
}) })
@ -377,8 +376,8 @@ in
]; ];
environment = { environment = {
KEA_PIDFILE_DIR = "/run/kea-dhcp6"; KEA_PIDFILE_DIR = "/run/kea";
KEA_LOCKFILE_DIR = "/run/kea-dhcp6"; KEA_LOCKFILE_DIR = "/run/kea";
}; };
restartTriggers = [ restartTriggers = [
@ -394,7 +393,6 @@ in
CapabilityBoundingSet = [ CapabilityBoundingSet = [
"CAP_NET_BIND_SERVICE" "CAP_NET_BIND_SERVICE"
]; ];
RuntimeDirectory = "kea-dhcp6";
} // commonServiceConfig; } // commonServiceConfig;
}; };
}) })
@ -423,8 +421,8 @@ in
]; ];
environment = { environment = {
KEA_PIDFILE_DIR = "/run/kea-dhcp-ddns"; KEA_PIDFILE_DIR = "/run/kea";
KEA_LOCKFILE_DIR = "/run/kea-dhcp-ddns"; KEA_LOCKFILE_DIR = "/run/kea";
}; };
restartTriggers = [ restartTriggers = [
@ -439,7 +437,6 @@ in
CapabilityBoundingSet = [ CapabilityBoundingSet = [
"CAP_NET_BIND_SERVICE" "CAP_NET_BIND_SERVICE"
]; ];
RuntimeDirectory = "kea-dhcp-ddns";
} // commonServiceConfig; } // commonServiceConfig;
}; };
}) })

View file

@ -431,8 +431,8 @@ let
}; };
kea = let kea = let
controlSocketPathV4 = "/run/kea-dhcp4/dhcp4.sock"; controlSocketPathV4 = "/run/kea/dhcp4.sock";
controlSocketPathV6 = "/run/kea-dhcp6/dhcp6.sock"; controlSocketPathV6 = "/run/kea/dhcp6.sock";
in in
{ {
exporterConfig = { exporterConfig = {