From d932c880249fbd11bf885c9787d78e86e4274a38 Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Sat, 28 Mar 2026 13:50:44 +0530 Subject: [PATCH] mgr/dashboard: fix subvolume group corruption from smb share form the SMB share form accidentally corrupts the subvolume group when it issues a call to the subvolume_info API with an empty subvol_name which then corrupts the group entirely and the following subvolume creation gets failed. The fix is to not call subvol_info with an empty name. Fixes: https://tracker.ceph.com/issues/75771 Signed-off-by: Nizamudeen A --- .../smb-share-form.component.ts | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-form/smb-share-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-form/smb-share-form.component.ts index 530bb654e547..54aa17af23e3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-form/smb-share-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-share-form/smb-share-form.component.ts @@ -246,16 +246,21 @@ export class SmbShareFormComponent extends CdForm implements OnInit { const subvolGroup = this.smbShareForm.getValue('subvolume_group') || ''; // Default to empty if not present const subvol = this.smbShareForm.getValue('subvolume'); - this.subvolService - .info(fsName, subvol, subvolGroup) - .pipe(map((data: any) => data['path'])) - .subscribe( - (path: string) => { - this.updatePath(path); - resolve(); - }, - (error: any) => reject(error) - ); + if (subvol) { + this.subvolService + .info(fsName, subvol, subvolGroup) + .pipe(map((data: any) => data['path'])) + .subscribe( + (path: string) => { + this.updatePath(path); + resolve(); + }, + (error: any) => reject(error) + ); + } else { + this.updatePath(`/volumes/${subvolGroup}/`); + resolve(); + } }); } -- 2.47.3