diff --git a/manila/share/drivers/cephfs/driver.py b/manila/share/drivers/cephfs/driver.py index 620b3703e6..54fa85b079 100644 --- a/manila/share/drivers/cephfs/driver.py +++ b/manila/share/drivers/cephfs/driver.py @@ -1177,7 +1177,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase): export_ips = [] argdict = { - "nfs_cluster_id": nfs_clusterid, + "cluster_id": nfs_clusterid, } output = rados_command(self.rados_client, "nfs cluster info", argdict) @@ -1206,7 +1206,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase): """Allow access to the share.""" export = { "path": self._get_export_path(share), - "nfs_cluster_id": self.nfs_clusterid, + "cluster_id": self.nfs_clusterid, "pseudo": self._get_export_pseudo_path(share), "squash": "none", "security_label": True, @@ -1220,7 +1220,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase): } argdict = { - "nfs_cluster_id": self.nfs_clusterid, + "cluster_id": self.nfs_clusterid, } inbuf = json.dumps(export).encode('utf-8') @@ -1231,7 +1231,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase): """Deny access to the share.""" argdict = { - "nfs_cluster_id": self.nfs_clusterid, + "cluster_id": self.nfs_clusterid, "pseudo_path": self._get_export_pseudo_path(share) } diff --git a/manila/tests/share/drivers/cephfs/test_driver.py b/manila/tests/share/drivers/cephfs/test_driver.py index c53b113f25..dee29f6385 100644 --- a/manila/tests/share/drivers/cephfs/test_driver.py +++ b/manila/tests/share/drivers/cephfs/test_driver.py @@ -1278,12 +1278,12 @@ class NFSClusterProtocolHelperTestCase(test.TestCase): } access_allow_dict = { - "nfs_cluster_id": nfs_clusterid, + "cluster_id": nfs_clusterid, } export = { "path": "ganesha:/foo/bar", - "nfs_cluster_id": nfs_clusterid, + "cluster_id": nfs_clusterid, "pseudo": "ganesha:/foo/bar", "squash": "none", "security_label": True, @@ -1310,7 +1310,7 @@ class NFSClusterProtocolHelperTestCase(test.TestCase): nfs_clusterid = self._nfscluster_protocol_helper.nfs_clusterid access_deny_dict = { - "nfs_cluster_id": nfs_clusterid, + "cluster_id": nfs_clusterid, "pseudo_path": "ganesha:/foo/bar" } @@ -1325,7 +1325,7 @@ class NFSClusterProtocolHelperTestCase(test.TestCase): nfs_clusterid = self._nfscluster_protocol_helper.nfs_clusterid cluster_info_dict = { - "nfs_cluster_id": nfs_clusterid, + "cluster_id": nfs_clusterid, } cluster_info = {"fs-manila": { diff --git a/releasenotes/notes/bug-1991378-fix-cluster_id-param-cephfs-nfs-2ddc4ff98141b9b9.yaml b/releasenotes/notes/bug-1991378-fix-cluster_id-param-cephfs-nfs-2ddc4ff98141b9b9.yaml new file mode 100644 index 0000000000..e8a7b3c740 --- /dev/null +++ b/releasenotes/notes/bug-1991378-fix-cluster_id-param-cephfs-nfs-2ddc4ff98141b9b9.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + The CephFS NFS driver, specifically the NFSProtocolHelper + implementation, was passing a wrong param to the Ceph backend + and this was preventing users to add and deny access to the + created shares. With this fix, users of the CephFS NFS + NFSProtocolHelper can normally create and remove access + to their shares.