From: dparmar18 Date: Thu, 15 Dec 2022 11:24:27 +0000 (+0530) Subject: mgr/nfs: disallow non-existent paths when creating export X-Git-Tag: v19.0.0~1474^2~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=992c686a3dbff3b917885603c017ef3831143296;p=ceph.git mgr/nfs: disallow non-existent paths when creating export Fixes: https://tracker.ceph.com/issues/58228 Signed-off-by: Dhairya Parmar --- diff --git a/src/pybind/mgr/nfs/export.py b/src/pybind/mgr/nfs/export.py index e6c514ecf5374..935b12464e7b7 100644 --- a/src/pybind/mgr/nfs/export.py +++ b/src/pybind/mgr/nfs/export.py @@ -36,7 +36,7 @@ from .utils import ( conf_obj_name, available_clusters, check_fs, - restart_nfs_service) + restart_nfs_service, check_cephfs_path) if TYPE_CHECKING: from nfs.module import Module @@ -658,6 +658,9 @@ class ExportMgr: access_type: str, clients: list = [], sectype: Optional[List[str]] = None) -> Dict[str, Any]: + + check_cephfs_path(self.mgr, fs_name, path) + pseudo_path = normalize_path(pseudo_path) if not self._fetch_export(cluster_id, pseudo_path):