Skip to content

Commit

Permalink
doc: Add maintenance mode improvements
Browse files Browse the repository at this point in the history
Related to: harvester/harvester#5069

Signed-off-by: Volker Theile <vtheile@suse.com>
  • Loading branch information
votdev committed Mar 19, 2024
1 parent 17ebd59 commit 747db8d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/host/host.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ Because Harvester is built on top of Kubernetes and uses etcd as its database, t

For admin users, you can click **Enable Maintenance Mode** to evict all VMs from a node automatically. It will leverage the `VM live migration` feature to migrate all VMs to other nodes automatically. Note that at least two active nodes are required to use this feature.

If you want to individually force a shutdown of a VM instead of migrating it to another node, add the instance label `harvesterhci.io/maintain-force-shutdown-strategy` and one of these values to those VMs:

- `RestartOnEnable`: Restart the VM after the node has finally switched into maintenance mode.
- `RestartOnDisable`: Restart the VM after the maintenance mode of the node has been disabled.
- `StayOff`: Do not restart the VM.

A collective forced shutdown off all VMs on a node can be activated in the **Enable Maintenance Mode** dialog. This will disable individual settings via the `harvesterhci.io/maintain-force-shutdown-strategy` instance label.

If you are looking to execute a special command before shutting down the VM, then you should look at the [container lifecycle hook](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) `PreStop`.

![node-maintenance.png](/img/v1.2/host/node-maintenance.png)

## Cordoning a Node
Expand Down

0 comments on commit 747db8d

Please sign in to comment.