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 <nia@redhat.com>
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();
+ }
});
}