github.com/outbrain/consul@v1.4.5/website/source/docs/commands/leave.html.markdown.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: Leave"
     4  sidebar_current: "docs-commands-leave"
     5  description: |-
     6    The `leave` command triggers a graceful leave and shutdown of the agent. It 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.
     7  ---
     8  
     9  # Consul Leave
    10  
    11  Command: `consul leave`
    12  
    13  The `leave` command triggers a graceful leave and shutdown of the agent.
    14  It is used to ensure other nodes see the agent as "left" instead of
    15  "failed". Nodes that leave will not attempt to re-join the cluster
    16  on restarting with a snapshot.
    17  
    18  For nodes in server mode, the node is removed from the Raft peer set
    19  in a graceful manner. This is critical, as in certain situations a
    20  non-graceful leave can affect cluster availability.
    21  
    22  Running `consul leave` on a server explicitly will reduce the quorum size. Even if the cluster used `bootstrap_expect` to set a quorum size initially, issuing `consul leave` on a server will reconfigure the cluster to have fewer servers. 
    23  This means you could end up with just one server that is still able to commit writes because quorum is only 1, but those writes might be lost if that server fails before more are added.
    24  
    25  ## Usage
    26  
    27  Usage: `consul leave [options]`
    28  
    29  #### API Options
    30  
    31  <%= partial "docs/commands/http_api_options_client" %>