From: Nizamudeen A Date: Sat, 28 Mar 2026 08:20:44 +0000 (+0530) Subject: mgr/dashboard: fix subvolume group corruption from smb share form X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F68066%2Fhead;p=ceph.git 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 --- 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(); + } }); }