You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When draining a node, the Nomad API and CLI supports specifying custom metadata and a message which is persisted on the node object stored within state. The Nomad Autoscaler should take advantage of this, by adding custom data when triggering node drains due to scale-in cluster activities. This will allow operators to track certain autoscaler operations via the Nomad API for administrative purposes and allow searching for failed scaling due to the current inability of the autoscaler to share state across instances of itself.
The exact content of the metadata should be discussed before moving forward. If any community members reading this have thoughts, please feel free to share them as a comment.
$ nomad node drain -enable -m "drain due to autoscaling" -meta 'user=jrasell' 4bd8
Are you sure you want to enable drain mode for node "4bd861a2-707a-32d6-89ba-ce07ea8bb05a"? [y/N] y
2023-04-28T08:38:57+01:00: Ctrl-C to stop monitoring: will not cancel the node drain
2023-04-28T08:38:57+01:00: Node "4bd861a2-707a-32d6-89ba-ce07ea8bb05a" drain strategy set
2023-04-28T08:38:57+01:00: All allocations on node "4bd861a2-707a-32d6-89ba-ce07ea8bb05a" have stopped
2023-04-28T08:38:57+01:00: Drain complete for node 4bd861a2-707a-32d6-89ba-ce07ea8bb05a
When draining a node, the Nomad API and CLI supports specifying custom metadata and a message which is persisted on the node object stored within state. The Nomad Autoscaler should take advantage of this, by adding custom data when triggering node drains due to scale-in cluster activities. This will allow operators to track certain autoscaler operations via the Nomad API for administrative purposes and allow searching for failed scaling due to the current inability of the autoscaler to share state across instances of itself.
The exact content of the metadata should be discussed before moving forward. If any community members reading this have thoughts, please feel free to share them as a comment.
Nomad CLI docs: https://developer.hashicorp.com/nomad/docs/commands/node/drain
Nomad API docs: https://developer.hashicorp.com/nomad/api-docs/nodes#drain-node
Example of draining with message and metadata:
The text was updated successfully, but these errors were encountered: