treewide: move StartLimitIntervalSec/StartLimitBurst to unitConfig

This commit is contained in:
Sandro Jäckel 2025-07-03 15:48:28 +02:00
parent 605cfcce80
commit f88e1c39e9
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
8 changed files with 23 additions and 7 deletions

View File

@ -295,6 +295,8 @@ in
''; '';
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;
};
unitConfig = {
StartLimitBurst = 3; StartLimitBurst = 3;
StartLimitInterval = 10; StartLimitInterval = 10;
}; };

View File

@ -123,9 +123,11 @@ in
ExecStart = "${cfg.package}/sbin/start-master.sh"; ExecStart = "${cfg.package}/sbin/start-master.sh";
ExecStop = "${cfg.package}/sbin/stop-master.sh"; ExecStop = "${cfg.package}/sbin/stop-master.sh";
TimeoutSec = 300; TimeoutSec = 300;
StartLimitBurst = 10;
Restart = "always"; Restart = "always";
}; };
unitConfig = {
StartLimitBurst = 10;
};
}; };
spark-worker = lib.mkIf cfg.worker.enable { spark-worker = lib.mkIf cfg.worker.enable {
path = with pkgs; [ path = with pkgs; [
@ -151,9 +153,11 @@ in
ExecStart = "${cfg.package}/sbin/start-worker.sh spark://${cfg.worker.master}"; ExecStart = "${cfg.package}/sbin/start-worker.sh spark://${cfg.worker.master}";
ExecStop = "${cfg.package}/sbin/stop-worker.sh"; ExecStop = "${cfg.package}/sbin/stop-worker.sh";
TimeoutSec = 300; TimeoutSec = 300;
StartLimitBurst = 10;
Restart = "always"; Restart = "always";
}; };
unitConfig = {
StartLimitBurst = 10;
};
}; };
}; };
tmpfiles.rules = [ tmpfiles.rules = [

View File

@ -195,6 +195,8 @@ in
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 10; RestartSec = 10;
};
unitConfig = {
StartLimitBurst = 5; StartLimitBurst = 5;
}; };
}; };

View File

@ -157,9 +157,11 @@ in
ExecStart = "${cfg.package}/bin/conduit"; ExecStart = "${cfg.package}/bin/conduit";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 10; RestartSec = 10;
StartLimitBurst = 5;
UMask = "077"; UMask = "077";
}; };
unitConfig = {
StartLimitBurst = 5;
};
}; };
}; };
} }

View File

@ -310,7 +310,6 @@ in
Restart = "always"; Restart = "always";
RestartSec = 10; RestartSec = 10;
StartLimitBurst = 5;
UMask = "007"; UMask = "007";
LimitNOFILE = "100000"; LimitNOFILE = "100000";
@ -341,6 +340,9 @@ in
"~@privileged" "~@privileged"
]; ];
}; };
unitConfig = {
StartLimitBurst = 5;
};
} }
)) ))
) eachFedimintd; ) eachFedimintd;

View File

@ -298,7 +298,6 @@ in
Nice = -5; Nice = -5;
Type = "forking"; Type = "forking";
NotifyAccess = "all"; NotifyAccess = "all";
StartLimitBurst = "3";
TimeoutSec = 120; TimeoutSec = 120;
WatchdogSec = 60; WatchdogSec = 60;
RestartSec = 5; RestartSec = 5;
@ -309,6 +308,9 @@ in
ExecStop = "${pkgs.frr}/libexec/frr/frrinit.sh stop"; ExecStop = "${pkgs.frr}/libexec/frr/frrinit.sh stop";
ExecReload = "${pkgs.frr}/libexec/frr/frrinit.sh reload"; ExecReload = "${pkgs.frr}/libexec/frr/frrinit.sh reload";
}; };
unitConfig = {
StartLimitBurst = "3";
};
}; };
}; };

View File

@ -82,7 +82,6 @@ in
TimeoutSec = 0; TimeoutSec = 0;
RestartSec = 2; RestartSec = 2;
Restart = "always"; Restart = "always";
StartLimitBurst = 3;
LimitNOFILE = "infinity"; LimitNOFILE = "infinity";
LimitNPROC = "infinity"; LimitNPROC = "infinity";
LimitCORE = "infinity"; LimitCORE = "infinity";
@ -90,6 +89,9 @@ in
NotifyAccess = "all"; NotifyAccess = "all";
KillMode = "mixed"; KillMode = "mixed";
}; };
unitConfig = {
StartLimitBurst = 3;
};
}; };
}; };

View File

@ -29,7 +29,7 @@
]; ];
# Try for about 10 minutes rather than the default of 5 attempts. # Try for about 10 minutes rather than the default of 5 attempts.
serviceConfig.RestartSec = 1; serviceConfig.RestartSec = 1;
serviceConfig.StartLimitBurst = 600; unitConfig.StartLimitBurst = 600;
}; };
# systemd.services.vault.unitConfig.RequiresMountsFor = "/run/keys/"; # systemd.services.vault.unitConfig.RequiresMountsFor = "/run/keys/";