command: add docs for node drain -monitor flag

This commit is contained in:
Nick Ethier 2018-05-09 22:54:05 -04:00
parent 3c55f89738
commit b1d2437cf6
No known key found for this signature in database
GPG Key ID: 07C1A3ECED90D24A
2 changed files with 13 additions and 1 deletions

View File

@ -49,6 +49,9 @@ Node Drain Options:
-detach
Return immediately instead of entering monitor mode.
-monitor
Enter monitor mode directly without modifying the drain status.
-force
Force remove allocations off the node immediately.
@ -136,7 +139,7 @@ func (c *NodeDrainCommand) Run(args []string) int {
}
// Check that enable or disable is not set with monitor
if monitor && enable || monitor && disable {
if monitor && (enable || disable) {
c.Ui.Error("The -monitor flag cannot be used with the '-enable' or '-disable' flags")
c.Ui.Error(commandErrorText(c))
return 1

View File

@ -57,6 +57,7 @@ operation is desired.
node. Remaining allocations after the deadline are force removed from the
node. Defaults to 1 hour.
* `-detach`: Return immediately instead of entering monitor mode.
* `-monitor`: Enter monitor mode directly without modifying the drain status.
* `-force`: Force remove allocations off the node immediately.
* `-no-deadline`: No deadline allows the allocations to drain off the node
without being force stopped after a certain deadline.
@ -114,6 +115,14 @@ $ nomad node drain -disable -keep-ineligible 4d2ba53b
...
```
Enable drain mode and detach from monitoring, then reattach later:
```
$ nomad node drain -enable -detach -self
...
$ nomad node drain -self -monitor
...
```
[eligibility]: /docs/commands/node/eligibility.html
[migrate]: /docs/job-specification/migrate.html