Nomad: how to remove nomad node

Created on 12 Feb 2016  路  3Comments  路  Source: hashicorp/nomad

I tried to remove my "laptop" node via a DELETE call to
http://host:4646/v1/node/51d312f9-85b1-7de0-68fe-357904115797

but I get "invalid method".

As you can see below, my laptop is showing up twice in the nodes list.

ID DC Name Class Drain Status
d603b17b-261c-3679-5d74-e3aa35ea2ca4 dc1 app1 prod false ready
3b38ea74-c38b-56a2-affb-3788164fd2e7 dc1 app2 prod false ready
8505a423-5a2a-45ca-7a66-1feec9a52e7c dc1 laptop false down
51d312f9-85b1-7de0-68fe-357904115797 dc1 laptop false down

typquestion

Most helpful comment

You should use https://www.nomadproject.io/docs/commands/node-drain.html for migrating all allocations to another nodes.

Down nodes will be removed automatically in some period of time.

All 3 comments

You should use https://www.nomadproject.io/docs/commands/node-drain.html for migrating all allocations to another nodes.

Down nodes will be removed automatically in some period of time.

You shouldn't need to remove a Node, Nomad will remove nodes that are not connected to it automatically. Nomad does GC of down nodes periodically.

@mkabischev Node Drain is a little different, it just disables the node and doesn't schedule anything on that node and moves the allocations. But Nomad still knows about the client running on that Node, etc.

@diptanu, yeah i know. I meant that for graceful node removal it`s better to first enable drain. And only after that stop nomad client.

Was this page helpful?
0 / 5 - 0 ratings