github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/node/eligibility.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: node eligibility'
     4  description: >
     5    The node eligibility command is used to configure a node's scheduling
     6    eligibility.
     7  ---
     8  
     9  # Command: node eligibility
    10  
    11  The `node eligibility` command is used to toggle scheduling eligibility for a
    12  given node. By default nodes are eligible for scheduling meaning they can
    13  receive placements and run new allocations. Nodes that have their scheduling
    14  eligibility disabled are ineligible for new placements.
    15  
    16  The [`node drain`][drain] command automatically disables eligibility. Disabling
    17  a drain restore eligibility by default.
    18  
    19  Disable scheduling eligibility is useful when draining a set of nodes: first
    20  disable eligibility on each node that will be drained. Then drain each node.
    21  If you just drain each node allocations may get rescheduled multiple times as
    22  they get placed on nodes about to be drained.
    23  
    24  Disabling scheduling eligibility may also be useful when investigating poorly
    25  behaved nodes. It allows operators to investigate the current state of a node
    26  without the risk of additional work being assigned to it.
    27  
    28  ## Usage
    29  
    30  ```plaintext
    31  nomad node eligibility [options] <node>
    32  ```
    33  
    34  A `-self` flag can be used to toggle eligibility of the local node. If this is
    35  not supplied, a node ID or prefix must be provided. If there is an exact match,
    36  the eligibility will be adjusted for that node. Otherwise, a list of matching
    37  nodes and information will be displayed.
    38  
    39  It is also required to pass one of `-enable` or `-disable`, depending on which
    40  operation is desired.
    41  
    42  If ACLs are enabled, this option requires a token with the 'node:write'
    43  capability.
    44  
    45  ## General Options
    46  
    47  @include 'general_options_no_namespace.mdx'
    48  
    49  ## Eligibility Options
    50  
    51  - `-enable`: Enable scheduling eligibility.
    52  - `-disable`: Disable scheduling eligibility.
    53  - `-self`: Set eligibility for the local node.
    54  - `-yes`: Automatic yes to prompts.
    55  
    56  ## Examples
    57  
    58  Enable scheduling eligibility on node with ID prefix "574545c5":
    59  
    60  ```shell-session
    61  $ nomad node eligibility -enable 574545c5
    62  Node "574545c5-c2d7-e352-d505-5e2cb9fe169f" scheduling eligibility set: eligible for scheduling
    63  ```
    64  
    65  Disable scheduling eligibility on the local node:
    66  
    67  ```shell-session
    68  $ nomad node eligibility -disable -self
    69  Node "574545c5-c2d7-e352-d505-5e2cb9fe169f" scheduling eligibility set: ineligible for scheduling
    70  ```
    71  
    72  [drain]: /docs/commands/node/drain