Consul Responses to Signals

SIGINT - Graceful leave by default.
SIGTERM - Non graceful leave by default.

Common kill signals and their impact on a running Consul process

Signal name Signal value Effect
SIGHUP 1 Reloads Consul’s service configuration (some services like Checks, Services, Watches, HTTP Client Address and Log Levels)
SIGINT 2 Usually generated by a Ctrl-c, graceful shutdown by default
SIGKILL 9 Non-graceful shutdown by default
SIGTERM 15 Non-graceful shutdown by default

We’ll explore combinations of signals and configurations and see how Consul behaves:

leave_on_terminate false & skip_leave_on_interrupt false.

  • On SIGTERM signal known peers list will not be affected.
  • On SIGINT(ctrl+c) signal known peers list will become null and the node will be deregistered from remaining nodes.

leave_on_terminate true & skip_leave_on_interrupt to false.

  • On SIGTERM signal known peers list will become null and the node will be deregistered from remaining nodes.
  • On SIGINT(ctrl+c) signal known peers list will become null and the node will be deregistered from remaining nodes.

leave_on_terminate true & skip_leave_on_interrupt to true.

  • On SIGTERM signal known peers list will become null and the node will be deregistered from remaining nodes.
  • On SIGINT(ctrl+c) signal known peers list will not be affected.

leave_on_terminate true & skip_leave_on_interrupt to true.

  • On SIGTERM signal known peers list will not be affected.
  • On SIGINT(ctrl+c) signal known peers list will not be affected.

Note that in case of a node failure (power failure or Consul kill signal) the known peers list will not affect.

results matching ""

    No results matching ""