command: add docs for node drain -monitor flag
This commit is contained in:
parent
3c55f89738
commit
b1d2437cf6
|
@ -49,6 +49,9 @@ Node Drain Options:
|
||||||
-detach
|
-detach
|
||||||
Return immediately instead of entering monitor mode.
|
Return immediately instead of entering monitor mode.
|
||||||
|
|
||||||
|
-monitor
|
||||||
|
Enter monitor mode directly without modifying the drain status.
|
||||||
|
|
||||||
-force
|
-force
|
||||||
Force remove allocations off the node immediately.
|
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
|
// 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("The -monitor flag cannot be used with the '-enable' or '-disable' flags")
|
||||||
c.Ui.Error(commandErrorText(c))
|
c.Ui.Error(commandErrorText(c))
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -57,6 +57,7 @@ operation is desired.
|
||||||
node. Remaining allocations after the deadline are force removed from the
|
node. Remaining allocations after the deadline are force removed from the
|
||||||
node. Defaults to 1 hour.
|
node. Defaults to 1 hour.
|
||||||
* `-detach`: Return immediately instead of entering monitor mode.
|
* `-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.
|
* `-force`: Force remove allocations off the node immediately.
|
||||||
* `-no-deadline`: No deadline allows the allocations to drain off the node
|
* `-no-deadline`: No deadline allows the allocations to drain off the node
|
||||||
without being force stopped after a certain deadline.
|
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
|
[eligibility]: /docs/commands/node/eligibility.html
|
||||||
[migrate]: /docs/job-specification/migrate.html
|
[migrate]: /docs/job-specification/migrate.html
|
||||||
|
|
Loading…
Reference in New Issue