mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
Merge pull request #4281 from hashicorp/f-leave-on-terminate-docs
Doc updates to clarify leave_on_terminate
This commit is contained in:
@@ -97,8 +97,8 @@ testing.
|
||||
the bind address of the specific network service if it is not provided. Any
|
||||
values configured in this stanza take precedence over the default
|
||||
[bind_addr](#bind_addr).
|
||||
|
||||
If the bind address is `0.0.0.0` then the address
|
||||
|
||||
If the bind address is `0.0.0.0` then the address
|
||||
private IP found is advertised. You may advertise an alternate port as well.
|
||||
The values support [go-sockaddr/template format][go-sockaddr/template].
|
||||
|
||||
@@ -155,11 +155,15 @@ testing.
|
||||
|
||||
- `leave_on_interrupt` `(bool: false)` - Specifies if the agent should
|
||||
gracefully leave when receiving the interrupt signal. By default, the agent
|
||||
will exit forcefully on any signal.
|
||||
will exit forcefully on any signal. This value should only be set to true on
|
||||
server agents if it is expected that a terminated server instance will never
|
||||
join the cluster again.
|
||||
|
||||
- `leave_on_terminate` `(bool: false)` - Specifies if the agent should
|
||||
gracefully leave when receiving the terminate signal. By default, the agent
|
||||
will exit forcefully on any signal.
|
||||
will exit forcefully on any signal. This value should only be set to true on
|
||||
server agents if it is expected that a terminated server instance will never
|
||||
join the cluster again.
|
||||
|
||||
- `log_level` `(string: "INFO")` - Specifies the verbosity of logs the Nomad
|
||||
agent will output. Valid log levels include `WARN`, `INFO`, or `DEBUG` in
|
||||
|
||||
@@ -110,7 +110,7 @@ Additional metadata can be viewed by providing the `-detailed` flag.
|
||||
|
||||
You can use `Ctrl-C` (the interrupt signal) to halt the agent.
|
||||
By default, all signals will cause the agent to forcefully shutdown.
|
||||
The agent [can be configured](/docs/agent/configuration/index.html) to
|
||||
The agent [can be configured](/docs/agent/configuration/index.html#leave_on_terminate) to
|
||||
gracefully leave on either the interrupt or terminate signals.
|
||||
|
||||
After interrupting the agent, you should see it leave the cluster
|
||||
@@ -134,10 +134,13 @@ replication continues to be attempted until the node recovers. Nomad will
|
||||
automatically try to reconnect to _failed_ nodes, allowing it to recover from
|
||||
certain network conditions, while _left_ nodes are no longer contacted.
|
||||
|
||||
If an agent is operating as a server, a graceful leave is important to avoid
|
||||
causing a potential availability outage affecting the
|
||||
[consensus protocol](/docs/internals/consensus.html). If a server does
|
||||
forcefully exit and will not be returning into service, the
|
||||
If an agent is operating as a server, [leave_on_terminate](/docs/agent/configuration/index.html#leave_on_terminate) should only
|
||||
be set if the server will never rejoin the cluster again. The default value of `false` for 'leave_on_terminate` and `leave_on_interrupt`
|
||||
work well for most scenarios. If Nomad servers are part of an auto scaling group where new servers are brought up to replace
|
||||
failed servers, using graceful leave avoids causing a potential availability outage affecting the [consensus protocol](/docs/internals/consensus.html).
|
||||
As of of Nomad 0.8, Nomad includes Autopilot which automatically removes failed or dead servers. This allows the operator to skip setting leave_on_terminate
|
||||
|
||||
If a server does forcefully exit and will not be returning into service, the
|
||||
[`server force-leave` command](/docs/commands/server/force-leave.html) should
|
||||
be used to force the server from a _failed_ to a _left_ state.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user