From: Afreen Date: Mon, 29 Jan 2024 10:12:10 +0000 (+0530) Subject: mgr/dashboard: Create subvol of same name in different group X-Git-Tag: v19.1.0~405^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fb79df410d39ad01c9192433e03d8a0a33c81568;p=ceph.git mgr/dashboard: Create subvol of same name in different group Fixes https://tracker.ceph.com/issues/64112 Issue: Currently, we are unable to create subvolume of same name in different subvolume group Fix: We are validating only the filesystem name of subvolume which is stopping the creation a subvolume of same name. Added more granularity , by adding the subvolumegroup name. Signed-off-by: Afreen --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-form/cephfs-subvolume-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-form/cephfs-subvolume-form.component.ts index 2c2fe8f9fa0ad..0d7df7c5225ba 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-form/cephfs-subvolume-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-form/cephfs-subvolume-form.component.ts @@ -108,7 +108,8 @@ export class CephfsSubvolumeFormComponent extends CdForm implements OnInit { this.cephFsSubvolumeService, null, null, - this.fsName + this.fsName, + this.subVolumeGroupName ) ] }), diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-subvolume.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-subvolume.service.ts index ad0ce248064db..e95503ff56b9d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-subvolume.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-subvolume.service.ts @@ -75,8 +75,8 @@ export class CephfsSubvolumeService { }); } - exists(subVolumeName: string, fsName: string) { - return this.info(fsName, subVolumeName).pipe( + exists(subVolumeName: string, fsName: string, subVolumeGroupName: string = '') { + return this.info(fsName, subVolumeName, subVolumeGroupName).pipe( mapTo(true), catchError((error: Event) => { if (_.isFunction(error.preventDefault)) {