]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Create subvol of same name in different group 55349/head
authorAfreen <afreen23.git@gmail.com>
Mon, 29 Jan 2024 10:12:10 +0000 (15:42 +0530)
committerAfreen <afreen23.git@gmail.com>
Mon, 29 Jan 2024 10:12:10 +0000 (15:42 +0530)
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 <afreen23.git@gmail.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-form/cephfs-subvolume-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs-subvolume.service.ts

index 2c2fe8f9fa0adbc7ca8f5a966c445703d1b7cf92..0d7df7c5225bac08ad13dbaa6d5ab9b0585fc591 100644 (file)
@@ -108,7 +108,8 @@ export class CephfsSubvolumeFormComponent extends CdForm implements OnInit {
             this.cephFsSubvolumeService,
             null,
             null,
-            this.fsName
+            this.fsName,
+            this.subVolumeGroupName
           )
         ]
       }),
index ad0ce248064db29faab549d3d29c1da3afd8115c..e95503ff56b9d81a57cecb63af81df5d730e1e8e 100644 (file)
@@ -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)) {