This issue is described in hashicorp/nomad#5459 but this is a really simple to reproduce version of the same.
nomad_sighup
is a really simple Go program, which listens for SIGHUP
signal to be sent and prints "Received SIGHUP signal". It listens for this signal in an infinite for-loop.
The nomad deployment specs, deploys the same binary with raw_exec
driver. There's a template
block defined, which is a dummy configuration template. It watches for a Nomad service object doggo-web
and updates whenever the Address/IP of this service updates. When that happens, Nomad is configured to send a SIGHUP
signal to the underlying process.