From dbd0691a6925807e9b0b38099f7f15c9d3eb7400 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Thu, 10 May 2018 15:27:14 -0500 Subject: [PATCH 1/2] Doc updates to clarify leave_on_terminate --- .../source/docs/agent/configuration/index.html.md | 12 ++++++++---- website/source/intro/getting-started/running.html.md | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/website/source/docs/agent/configuration/index.html.md b/website/source/docs/agent/configuration/index.html.md index 45b459107..14ed69c8f 100644 --- a/website/source/docs/agent/configuration/index.html.md +++ b/website/source/docs/agent/configuration/index.html.md @@ -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 diff --git a/website/source/intro/getting-started/running.html.md b/website/source/intro/getting-started/running.html.md index 2a66ef91d..a919e0f5b 100644 --- a/website/source/intro/getting-started/running.html.md +++ b/website/source/intro/getting-started/running.html.md @@ -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,9 +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 +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). +With newer features in [autopilot](/guides/cluster/autopilot.html) in Nomad 0.8, failed or dead servers are removed if they have been replaced. + +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. From bce246fb868e7e085168cc1a5d19581b10b720f8 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Fri, 11 May 2018 14:21:56 -0500 Subject: [PATCH 2/2] change wording around autopilot --- website/source/intro/getting-started/running.html.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/website/source/intro/getting-started/running.html.md b/website/source/intro/getting-started/running.html.md index a919e0f5b..ef72dad4d 100644 --- a/website/source/intro/getting-started/running.html.md +++ b/website/source/intro/getting-started/running.html.md @@ -138,10 +138,9 @@ If an agent is operating as a server, [leave_on_terminate](/docs/agent/configura 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). -With newer features in [autopilot](/guides/cluster/autopilot.html) in Nomad 0.8, failed or dead servers are removed if they have been replaced. +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 +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.