From 3c92a06268667bac890c255b4963156402d7b341 Mon Sep 17 00:00:00 2001 From: freeze <1615081+Vicente-Cheng@users.noreply.github.com> Date: Wed, 23 Sep 2026 12:14:48 +0800 Subject: [PATCH] feat: drop striped LVM volume group type from v1.9.1 (#1167) The LVM add-on reaches GA in v1.9.1 and only supports dm-thin. Gate the striped option behind a v1.9.1 feature flag, default new LVM storage classes to dm-thin, and reset a cloned striped type so older clusters keep the current behaviour. Related issue: harvester/harvester#11731 Signed-off-by: Vicente Cheng --- pkg/harvester/config/feature-flags.js | 4 +++- .../provisioners/lvm.driver.harvesterhci.io.vue | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pkg/harvester/config/feature-flags.js b/pkg/harvester/config/feature-flags.js index 898365e2..5f0f182a 100644 --- a/pkg/harvester/config/feature-flags.js +++ b/pkg/harvester/config/feature-flags.js @@ -77,7 +77,9 @@ const FEATURE_FLAGS = { 'staticIPForVM', 'fsFreezeDeadline', ], - 'v1.9.1': [], + 'v1.9.1': [ + 'lvmDmThinOnly', + ], 'v1.10.0': [], }; diff --git a/pkg/harvester/edit/harvesterhci.io.storage/provisioners/lvm.driver.harvesterhci.io.vue b/pkg/harvester/edit/harvesterhci.io.storage/provisioners/lvm.driver.harvesterhci.io.vue index 7b7b925c..7c8a0403 100644 --- a/pkg/harvester/edit/harvesterhci.io.storage/provisioners/lvm.driver.harvesterhci.io.vue +++ b/pkg/harvester/edit/harvesterhci.io.storage/provisioners/lvm.driver.harvesterhci.io.vue @@ -7,8 +7,12 @@ import { allHash } from '@shell/utils/promise'; import { clone } from '@shell/utils/object'; import { HCI } from '../../../types'; import { NODE } from '@shell/config/types'; +import { _CREATE, _CLONE } from '@shell/config/query-params'; import { LVM_TOPOLOGY_LABEL } from '../index.vue'; +const STRIPED_TYPE = 'striped'; +const DM_THIN_TYPE = 'dm-thin'; + const DEFAULT_PARAMETERS = [ 'type', 'vgName' @@ -54,8 +58,17 @@ export default { data() { const node = (this.value.allowedTopologies?.[0]?.matchLabelExpressions || []).find((t) => t.key === LVM_TOPOLOGY_LABEL)?.values[0]; + // striped is dropped once the LVM add-on reaches GA (v1.9.1); dm-thin is the only supported type. + const dmThinOnly = this.$store.getters['harvester-common/getFeatureEnabled']('lvmDmThinOnly'); + const volumeGroupTypes = dmThinOnly ? [DM_THIN_TYPE] : [STRIPED_TYPE, DM_THIN_TYPE]; + + // Default new storage classes to dm-thin, and reset a cloned striped type that is no longer selectable. + if (dmThinOnly && [_CREATE, _CLONE].includes(this.realMode) && !volumeGroupTypes.includes(this.value.parameters.type)) { + this.value.parameters.type = DM_THIN_TYPE; + } + return { - volumeGroupTypes: ['striped', 'dm-thin'], + volumeGroupTypes, node, }; },