From 41132ee37d0897cf021aba42cc1883da565c5ef3 Mon Sep 17 00:00:00 2001 From: Cooper Tseng Date: Wed, 18 Sep 2024 16:43:25 +0800 Subject: [PATCH 1/2] Add upgrade-config setting restoreVM document Signed-off-by: Cooper Tseng --- docs/advanced/settings.md | 7 +++++-- docs/advanced/singlenodeclusters.md | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/advanced/settings.md b/docs/advanced/settings.md index ea606b62c70..041cffe1d41 100644 --- a/docs/advanced/settings.md +++ b/docs/advanced/settings.md @@ -507,7 +507,7 @@ https://your.upgrade.checker-url/v99/checkupgrade **Definition**: Upgrade-related configuration. -**Default value**: `{"imagePreloadOption":{"strategy":{"type":"sequential"}}}` +**Default value**: `{"imagePreloadOption":{"strategy":{"type":"sequential"}}, "restoreVM": false}` **Supported options and fields**: @@ -546,6 +546,8 @@ https://your.upgrade.checker-url/v99/checkupgrade ::: +- `restoreVM`: This setting controls whether to automatically restore running VMs after a single-node upgrade. By default, it is set to `false`, meaning all VMs are stopped after the upgrade. If set to true, Harvester will restart VMs that were running prior to the upgrade. Note that VMs that were paused before the upgrade will remain stopped once the upgrade is complete. + **Example**: ```json @@ -555,7 +557,8 @@ https://your.upgrade.checker-url/v99/checkupgrade "type": "parallel", "concurrency": 2 } - } + }, + "restoreVM": true } ``` diff --git a/docs/advanced/singlenodeclusters.md b/docs/advanced/singlenodeclusters.md index b1795075c8b..1dbebde4198 100644 --- a/docs/advanced/singlenodeclusters.md +++ b/docs/advanced/singlenodeclusters.md @@ -55,6 +55,6 @@ If you want Longhorn to create multiple replicas on a node with multiple disks, ## Upgrades and Maintenance -Single-node clusters do not support [Live Migration](../vm/live-migration.md), so VMs become unavailable during cluster upgrades. Harvester forcibly shuts down all VMs before starting the upgrade process. +Single-node clusters do not support [Live Migration](../vm/live-migration.md), so VMs become unavailable during cluster upgrades. Harvester forcibly shuts down all VMs before starting the upgrade process. To restore running VMs after upgrade, please set `restoreVM` to true in the [`upgrade-config` setting](./settings.md#upgrade-config). Enabling [Maintenance Mode](../host/host.md#node-maintenance) is also not possible because that operation relies on Live Migration functionality, and Harvester cannot place the only control plane in Maintenance Mode. From 8544ed07fa2aaf9fd94c260ccc274768ebcfffb6 Mon Sep 17 00:00:00 2001 From: Cooper Tseng Date: Fri, 20 Sep 2024 16:57:05 +0800 Subject: [PATCH 2/2] Address comment --- docs/advanced/settings.md | 2 +- docs/advanced/singlenodeclusters.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced/settings.md b/docs/advanced/settings.md index 041cffe1d41..ca6775cc824 100644 --- a/docs/advanced/settings.md +++ b/docs/advanced/settings.md @@ -546,7 +546,7 @@ https://your.upgrade.checker-url/v99/checkupgrade ::: -- `restoreVM`: This setting controls whether to automatically restore running VMs after a single-node upgrade. By default, it is set to `false`, meaning all VMs are stopped after the upgrade. If set to true, Harvester will restart VMs that were running prior to the upgrade. Note that VMs that were paused before the upgrade will remain stopped once the upgrade is complete. +- `restoreVM`: Option that enables Harvester to automatically restore running VMs after a single-node cluster is upgraded. The default value is `false`, which causes all VMs to be stopped after the upgrade is completed. When set to `true`, Harvester restarts VMs that were running before the upgrade was started. VMs that were paused before the upgrade are not restarted. **Example**: diff --git a/docs/advanced/singlenodeclusters.md b/docs/advanced/singlenodeclusters.md index 1dbebde4198..efd664ceadc 100644 --- a/docs/advanced/singlenodeclusters.md +++ b/docs/advanced/singlenodeclusters.md @@ -55,6 +55,6 @@ If you want Longhorn to create multiple replicas on a node with multiple disks, ## Upgrades and Maintenance -Single-node clusters do not support [Live Migration](../vm/live-migration.md), so VMs become unavailable during cluster upgrades. Harvester forcibly shuts down all VMs before starting the upgrade process. To restore running VMs after upgrade, please set `restoreVM` to true in the [`upgrade-config` setting](./settings.md#upgrade-config). +Single-node clusters do not support [Live Migration](../vm/live-migration.md), so VMs become unavailable during cluster upgrades. Harvester forcibly shuts down all VMs before starting the upgrade process. You can configure Harvester to automatically restore running VMs using the `restoreVM` option of the [`upgrade-config`](./settings.md#upgrade-config) setting. Enabling [Maintenance Mode](../host/host.md#node-maintenance) is also not possible because that operation relies on Live Migration functionality, and Harvester cannot place the only control plane in Maintenance Mode.