]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: handle the cephfs permission issue in nfs exports 48316/head
authorNizamudeen A <nia@redhat.com>
Tue, 27 Sep 2022 06:12:05 +0000 (11:42 +0530)
committerNizamudeen A <nia@redhat.com>
Fri, 30 Sep 2022 14:40:56 +0000 (20:10 +0530)
Fixes: https://tracker.ceph.com/issues/48686
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 81da1cbfa93b0f4a8d26aeae41247a25180644b9)

src/pybind/mgr/dashboard/controllers/nfs.py

index a609a46a5de355edddfa31729eb9533f945fe0fd..c5ab05de75ec60d51aa1236527960f32ba777849 100644 (file)
@@ -13,7 +13,8 @@ from mgr_module import NFS_GANESHA_SUPPORTED_FSALS
 from .. import mgr
 from ..security import Scope
 from ..services.cephfs import CephFS
-from ..services.exception import DashboardException, serialize_dashboard_exception
+from ..services.exception import DashboardException, handle_cephfs_error, \
+    serialize_dashboard_exception
 from . import APIDoc, APIRouter, BaseController, Endpoint, EndpointDoc, \
     ReadPermission, RESTController, Task, UIRouter
 from ._version import APIVersion
@@ -118,6 +119,7 @@ class NFSGaneshaExports(RESTController):
 
         return exports
 
+    @handle_cephfs_error()
     @NfsTask('create', {'path': '{path}', 'fsal': '{fsal.name}',
                         'cluster_id': '{cluster_id}'}, 2.0)
     @EndpointDoc("Creates a new NFS-Ganesha export",