From fd4ba6ebb6cdeacd9f252b37959da297cab82baa Mon Sep 17 00:00:00 2001 From: hc-github-team-nomad-core <82989552+hc-github-team-nomad-core@users.noreply.github.com> Date: Thu, 16 Nov 2023 07:41:47 -0600 Subject: [PATCH] Backport of Move systemd unit file rate limits from [Service] to [Unit] block into release/1.6.x #19103 Co-authored-by: Adrian Todorov --- .../usr/lib/systemd/system/nomad.service | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.release/linux/package/usr/lib/systemd/system/nomad.service b/.release/linux/package/usr/lib/systemd/system/nomad.service index 93546f074..4ca09fd1d 100644 --- a/.release/linux/package/usr/lib/systemd/system/nomad.service +++ b/.release/linux/package/usr/lib/systemd/system/nomad.service @@ -10,17 +10,6 @@ After=network-online.target #Wants=consul.service #After=consul.service -[Service] -EnvironmentFile=-/etc/nomad.d/nomad.env -ExecReload=/bin/kill -HUP $MAINPID -ExecStart=/usr/bin/nomad agent -config /etc/nomad.d -KillMode=process -KillSignal=SIGINT -LimitNOFILE=65536 -LimitNPROC=infinity -Restart=on-failure -RestartSec=2 - ## Configure unit start rate limiting. Units which are started more than ## *burst* times within an *interval* time span are not permitted to start any ## more. Use `StartLimitIntervalSec` or `StartLimitInterval` (depending on @@ -36,6 +25,17 @@ RestartSec=2 ## StartLimitInterval is used for systemd versions < 230 # StartLimitInterval = 10s +[Service] +EnvironmentFile=-/etc/nomad.d/nomad.env +ExecReload=/bin/kill -HUP $MAINPID +ExecStart=/usr/bin/nomad agent -config /etc/nomad.d +KillMode=process +KillSignal=SIGINT +LimitNOFILE=65536 +LimitNPROC=infinity +Restart=on-failure +RestartSec=2 + TasksMax=infinity OOMScoreAdjust=-1000