e2e: Ensure Consul client is running before starting Nomad service. (#24964)

This commit is contained in:
James Rasell
2025-01-28 16:28:12 +01:00
committed by GitHub
parent 09eb473189
commit 8859cfa3f5
2 changed files with 7 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ Requires=network-online.target
After=network-online.target
[Service]
Type=notify
Restart=on-failure
Environment=CONSUL_ALLOW_PRIVILEGED_PORTS=true
WorkingDirectory=/etc/consul.d

View File

@@ -5,6 +5,12 @@ After=network-online.target
StartLimitIntervalSec=0
StartLimitBurst=3
# Nomad and Consul are started very closely together. This helps ensure Consul
# is already running before Nomad starts and avoids having to SIGHUP the Nomad
# clients in order to reload the Consul fingerprints.
Wants=consul.service
After=consul.service
[Service]
User=root
ExecReload=/bin/kill -HUP $MAINPID