From fb79df410d39ad01c9192433e03d8a0a33c81568 Mon Sep 17 00:00:00 2001 From: Afreen Date: Mon, 29 Jan 2024 15:42:10 +0530 Subject: [PATCH] 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 --- .../cephfs-subvolume-form/cephfs-subvolume-form.component.ts | 3 ++- .../frontend/src/app/shared/api/cephfs-subvolume.service.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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)) { -- 2.39.5