consul/website/source/docs/commands/leave.html.markdown

31 lines
893 B
Markdown
Raw Normal View History

2014-02-08 00:41:03 +00:00
---
layout: "docs"
page_title: "Commands: Leave"
sidebar_current: "docs-commands-leave"
---
# Consul Leave
2014-02-08 00:41:03 +00:00
Command: `consul leave`
2014-02-08 00:41:03 +00:00
The leave command triggers a graceful leave and shutdown of the agent.
This is used to ensure other nodes see the agent as "left" instead of
"failed". Nodes that leave will not attempt to re-join the cluster
on restarting with a snapshot.
For nodes in server mode, the node is removed from the Raft peer set
in a graceful manner. This is critical, as in certain situations a
non-graceful leave can affect cluster availability.
2014-02-08 00:41:03 +00:00
## Usage
Usage: `consul leave`
2014-02-08 00:41:03 +00:00
The command-line flags are all optional. The list of available flags are:
* `-rpc-addr` - Address to the RPC server of the agent you want to contact
to send this command. If this isn't specified, the command will contact
"127.0.0.1:8400" which is the default RPC address of a Consul agent.
2014-02-08 00:41:03 +00:00