diff --git a/pkg/harvester/edit/harvesterhci.io.host/HarvesterKsmtuned.vue b/pkg/harvester/edit/harvesterhci.io.host/HarvesterKsmtuned.vue index d742ee26..d0106505 100644 --- a/pkg/harvester/edit/harvesterhci.io.host/HarvesterKsmtuned.vue +++ b/pkg/harvester/edit/harvesterhci.io.host/HarvesterKsmtuned.vue @@ -7,6 +7,8 @@ import { Checkbox } from '@components/Form/Checkbox'; import { HCI } from '../../types'; import { DOC } from '../../config/doc-links'; import { docLink } from '../../utils/feature-flags'; +import isEqual from 'lodash/isEqual'; +import { clone } from '@shell/utils/object'; export const ksmtunedMode = [{ value: 'standard', @@ -64,11 +66,13 @@ export default { this.enableMergeAcrossNodes = !!this.ksmtuned.spec?.mergeAcrossNodes; this.spec = this.ksmtuned.spec; + this.originSpec = clone(this.ksmtuned.spec); }, data() { return { ksmtuned: {}, + originSpec: {}, spec: {}, thresCoef: 30, ksmtunedMode, @@ -99,6 +103,11 @@ export default { methods: { async saveKsmtuned() { + // no ksmtuned spec change, skip save + if (isEqual(this.spec, this.originSpec)) { + return; + } + this.spec.mergeAcrossNodes = this.enableMergeAcrossNodes ? 1 : 0; this.ksmtuned['spec'] = this.spec; diff --git a/pkg/harvester/edit/harvesterhci.io.host/index.vue b/pkg/harvester/edit/harvesterhci.io.host/index.vue index 6f65c402..3f042bb1 100644 --- a/pkg/harvester/edit/harvesterhci.io.host/index.vue +++ b/pkg/harvester/edit/harvesterhci.io.host/index.vue @@ -527,7 +527,6 @@ export default { id: this.longhornNode.id, opt: { force: true }, }); - await new Promise((resolve) => setTimeout(resolve, '5000')); await retrySave(); } else {