mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
In #24526 we updated the Consul and Vault fingerprints so that they are no longer periodic. This fixed a problem that cluster admins reported where rolling updates of Vault or Consul would cause a thundering herd of fingerprint updates across the whole cluster. But if Consul/Vault is not available during the initial fingerprint, it will never get fingerprinted again. This is challenging for cluster updates and black starts because the implicit service startup ordering may require reloads. Instead, have the fingerprinter run periodically but mark that it has made its first successful fingerprint of all Consul/Vault clusters. At that point, we can skip further periodic updates. The `Reload` method will reset the mark and allow the subsequent fingerprint to run normally. Fixes: https://github.com/hashicorp/nomad/issues/25097 Ref: https://github.com/hashicorp/nomad/pull/24526 Ref: https://github.com/hashicorp/nomad/issues/24049
56 lines
1.6 KiB
Desktop File
56 lines
1.6 KiB
Desktop File
[Unit]
|
|
Description=Nomad
|
|
Documentation=https://nomadproject.io/docs/
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
|
|
# When using Nomad with Consul you should start Consul first, so that running
|
|
# allocations using Consul are restored correctly during startup.
|
|
#Wants=consul.service
|
|
#After=consul.service
|
|
|
|
## 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
|
|
## systemd version) to configure the checking interval and `StartLimitBurst`
|
|
## to configure how many starts per interval are allowed. The values in the
|
|
## commented lines are defaults.
|
|
|
|
# StartLimitBurst = 5
|
|
|
|
## StartLimitIntervalSec is used for systemd versions >= 230
|
|
# StartLimitIntervalSec = 10s
|
|
|
|
## StartLimitInterval is used for systemd versions < 230
|
|
# StartLimitInterval = 10s
|
|
|
|
[Service]
|
|
|
|
# Nomad clients need to be run as "root" whereas Nomad servers should be run as
|
|
# the "nomad" user. Please change this if needed.
|
|
User=root
|
|
Group=root
|
|
|
|
Type=notify
|
|
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
|
|
|
|
# Nomad Server agents should never be force killed,
|
|
# so here we disable OOM (out of memory) killing for this unit.
|
|
# However, you may wish to change this for Client agents, since
|
|
# the workloads that Nomad places may be more important
|
|
# than the Nomad agent itself.
|
|
OOMScoreAdjust=-1000
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|