]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix-add-node-issue
authorSagar Gopale <sagar.gopale@ibm.com>
Mon, 16 Mar 2026 09:44:21 +0000 (15:14 +0530)
committerAfreen Misbah <afreen@ibm.com>
Wed, 29 Apr 2026 07:42:25 +0000 (13:12 +0530)
Fixes:https://tracker.ceph.com/issues/75500

Signed-off-by: Sagar Gopale <sagar.gopale@ibm.com>
(cherry picked from commit 93376e060aa6f2b91853efa093919f36ac2edbe1)

src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway-node/nvmeof-gateway-node-add-modal/nvmeof-gateway-node-add-modal.component.ts

index 93d856dd8e1d90d5e4385e842397cbf21e67511a..c6f1937f315bc9d15222c049356c635d7b54c53b 100644 (file)
@@ -150,12 +150,13 @@ export class NvmeofGatewayNodeAddModalComponent extends CdForm implements OnInit
       },
       error: (e) => {
         this.loadingReady();
+        const errorDetail = e?.error?.detail || e?.message || '';
         this.notificationService.show(
           NotificationType.error,
           this.taskMessageService.messages[this.ADD_GATEWAY_NODE_TASK].failure({
             group_name: this.groupName
           }),
-          e
+          errorDetail
         );
       }
     });
@@ -178,6 +179,10 @@ export class NvmeofGatewayNodeAddModalComponent extends CdForm implements OnInit
       modifiedSpec.placement = {};
     }
 
+    if ('locations' in modifiedSpec.placement) {
+      delete (modifiedSpec.placement as any).locations;
+    }
+
     modifiedSpec.placement.hosts = newHosts;
 
     return modifiedSpec;