github.com/ryanslade/nomad@v0.2.4-0.20160128061903-fc95782f2089/website/source/docs/commands/node-drain.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: node-drain"
     4  sidebar_current: "docs-commands-node-drain"
     5  description: >
     6    Toggle drain mode for a given node.
     7  ---
     8  
     9  # Command: node-drain
    10  
    11  The `node-drain` command is used to toggle drain mode on a given node. Drain
    12  mode prevents any new tasks from being allocated to the node, and begins
    13  migrating all existing allocations away.
    14  
    15  The [node-status](/docs/commands/node-status.html) command compliments this
    16  nicely by providing the current drain status of a given node.
    17  
    18  ## Usage
    19  
    20  ```
    21  nomad node-drain [options] <node>
    22  ```
    23  
    24  A node ID or prefix must be provided. If there is an exact match, the
    25  drain mode will be adjusted for that node. Otherwise, a list of matching
    26  nodes and information will be displayed.
    27  
    28  It is also required to pass one of `-enable` or `-disable`, depending on which
    29  operation is desired.
    30  
    31  ## General Options
    32  
    33  <%= general_options_usage %>
    34  
    35  ## Node Drain Options
    36  
    37  * `-enable`: Enable node drain mode.
    38  * `-disable`: Disable node drain mode.
    39  
    40  ## Examples
    41  
    42  Enable drain mode on node1:
    43  
    44  ```
    45  $ nomad node-drain -enable node1
    46  ```