Skip to content

Commit d196e22

Browse files
committed
Apply disks changes when retrying save requests
Signed-off-by: Francesco Torchia <[email protected]>
1 parent cbeee2d commit d196e22

File tree

1 file changed

+6
-5
lines changed
  • pkg/harvester/edit/harvesterhci.io.host

1 file changed

+6
-5
lines changed

pkg/harvester/edit/harvesterhci.io.host/index.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,16 +493,17 @@ export default {
493493
async saveLonghornNode() {
494494
const inStore = this.$store.getters['currentProduct'].inStore;
495495
496-
const disks = this.longhornNode?.spec?.disks || {};
497-
498-
this.newDisks.map((disk) => {
499-
(disks[disk.name] || {}).tags = disk.tags;
500-
});
496+
const storageTags = clone(this.longhornNode?.spec?.tags);
501497
502498
let count = 0;
503499
504500
const retrySave = async() => {
505501
try {
502+
this.longhornNode.spec.tags = storageTags;
503+
this.newDisks.forEach((disk) => {
504+
(this.longhornNode?.spec?.disks?.[disk.name] || {}).tags = disk.tags;
505+
});
506+
506507
await this.longhornNode.save();
507508
} catch (err) {
508509
if ((err.status === 409 || err.status === 403) && count < 3) {

0 commit comments

Comments
 (0)