forked from rarias/jungle
Move StartLimit* options to unit section
The StartLimitBurst and StartLimitIntervalSec options belong to the [Unit] section, otherwise they are ignored in [Service]: > Unknown key 'StartLimitIntervalSec' in section [Service], ignoring. When using [Unit], the limits are properly set: apex% systemctl show power-policy.service | grep StartLimit StartLimitIntervalUSec=10min StartLimitBurst=10 StartLimitAction=none Reviewed-by: Aleix Boné <abonerib@bsc.es>
This commit is contained in:
parent
343b4f155e
commit
d591721a61
@ -18,13 +18,15 @@ in
|
|||||||
systemd.services."power-policy" = {
|
systemd.services."power-policy" = {
|
||||||
description = "Set power policy to use via IPMI";
|
description = "Set power policy to use via IPMI";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
unitConfig = {
|
||||||
|
StartLimitBurst = "10";
|
||||||
|
StartLimitIntervalSec = "10m";
|
||||||
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.ipmitool}/bin/ipmitool chassis policy ${cfg}";
|
ExecStart = "${pkgs.ipmitool}/bin/ipmitool chassis policy ${cfg}";
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = "5s";
|
RestartSec = "5s";
|
||||||
StartLimitBurst = "10";
|
|
||||||
StartLimitIntervalSec = "10m";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user