File tree 1 file changed +7
-6
lines changed
pkg/harvester/edit/harvesterhci.io.host
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ export default {
337
337
tagDisks = this .newDisks .filter (d => d .blockDevice && ! isEqual (d .blockDevice .spec .tags , d .tags ));
338
338
339
339
if (tagDisks .length === 0 ) {
340
- return Promise .resolve ();
340
+ return Promise .resolve ();
341
341
}
342
342
} else if (addDisks .length !== 0 && removeDisks .length === 0 ) {
343
343
const updatedDisks = addDisks .filter ((d ) => {
@@ -493,16 +493,17 @@ export default {
493
493
async saveLonghornNode () {
494
494
const inStore = this .$store .getters [' currentProduct' ].inStore ;
495
495
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 );
501
497
502
498
let count = 0 ;
503
499
504
500
const retrySave = async () => {
505
501
try {
502
+ this .longhornNode .spec .tags = storageTags;
503
+ this .newDisks .forEach ((disk ) => {
504
+ (this .longhornNode ? .spec ? .disks ? .[disk .name ] || {}).tags = disk .tags ;
505
+ });
506
+
506
507
await this .longhornNode .save ();
507
508
} catch (err) {
508
509
if ((err .status === 409 || err .status === 403 ) && count < 3 ) {
You can’t perform that action at this time.
0 commit comments