Rename 'nfs_cluster_id' to 'cluster_id' in the NFSProtocolHelper
The CephFS NFS driver, specifically the NFSProtocolHelper implementation, is passing a wrong param to the Ceph backend and this is preventing users to add and/or deny access to the created shares. The 'nfs_cluster_id' field has been renamed to 'cluster_id' to comply with what the rados client expects. With this fix, users of the CephFS NFS NFSProtocolHelper can normally create and remove access to their shares. Closes-Bug: #1991378 Change-Id: Ibc5681e59691d55536c5539feef97b14f74d98ba
This commit is contained in:
parent
3f431ef9eb
commit
ed0af6e9dd
@ -1177,7 +1177,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase):
|
|||||||
export_ips = []
|
export_ips = []
|
||||||
|
|
||||||
argdict = {
|
argdict = {
|
||||||
"nfs_cluster_id": nfs_clusterid,
|
"cluster_id": nfs_clusterid,
|
||||||
}
|
}
|
||||||
|
|
||||||
output = rados_command(self.rados_client, "nfs cluster info", argdict)
|
output = rados_command(self.rados_client, "nfs cluster info", argdict)
|
||||||
@ -1206,7 +1206,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase):
|
|||||||
"""Allow access to the share."""
|
"""Allow access to the share."""
|
||||||
export = {
|
export = {
|
||||||
"path": self._get_export_path(share),
|
"path": self._get_export_path(share),
|
||||||
"nfs_cluster_id": self.nfs_clusterid,
|
"cluster_id": self.nfs_clusterid,
|
||||||
"pseudo": self._get_export_pseudo_path(share),
|
"pseudo": self._get_export_pseudo_path(share),
|
||||||
"squash": "none",
|
"squash": "none",
|
||||||
"security_label": True,
|
"security_label": True,
|
||||||
@ -1220,7 +1220,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase):
|
|||||||
}
|
}
|
||||||
|
|
||||||
argdict = {
|
argdict = {
|
||||||
"nfs_cluster_id": self.nfs_clusterid,
|
"cluster_id": self.nfs_clusterid,
|
||||||
}
|
}
|
||||||
|
|
||||||
inbuf = json.dumps(export).encode('utf-8')
|
inbuf = json.dumps(export).encode('utf-8')
|
||||||
@ -1231,7 +1231,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase):
|
|||||||
"""Deny access to the share."""
|
"""Deny access to the share."""
|
||||||
|
|
||||||
argdict = {
|
argdict = {
|
||||||
"nfs_cluster_id": self.nfs_clusterid,
|
"cluster_id": self.nfs_clusterid,
|
||||||
"pseudo_path": self._get_export_pseudo_path(share)
|
"pseudo_path": self._get_export_pseudo_path(share)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1278,12 +1278,12 @@ class NFSClusterProtocolHelperTestCase(test.TestCase):
|
|||||||
}
|
}
|
||||||
|
|
||||||
access_allow_dict = {
|
access_allow_dict = {
|
||||||
"nfs_cluster_id": nfs_clusterid,
|
"cluster_id": nfs_clusterid,
|
||||||
}
|
}
|
||||||
|
|
||||||
export = {
|
export = {
|
||||||
"path": "ganesha:/foo/bar",
|
"path": "ganesha:/foo/bar",
|
||||||
"nfs_cluster_id": nfs_clusterid,
|
"cluster_id": nfs_clusterid,
|
||||||
"pseudo": "ganesha:/foo/bar",
|
"pseudo": "ganesha:/foo/bar",
|
||||||
"squash": "none",
|
"squash": "none",
|
||||||
"security_label": True,
|
"security_label": True,
|
||||||
@ -1310,7 +1310,7 @@ class NFSClusterProtocolHelperTestCase(test.TestCase):
|
|||||||
nfs_clusterid = self._nfscluster_protocol_helper.nfs_clusterid
|
nfs_clusterid = self._nfscluster_protocol_helper.nfs_clusterid
|
||||||
|
|
||||||
access_deny_dict = {
|
access_deny_dict = {
|
||||||
"nfs_cluster_id": nfs_clusterid,
|
"cluster_id": nfs_clusterid,
|
||||||
"pseudo_path": "ganesha:/foo/bar"
|
"pseudo_path": "ganesha:/foo/bar"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1325,7 +1325,7 @@ class NFSClusterProtocolHelperTestCase(test.TestCase):
|
|||||||
nfs_clusterid = self._nfscluster_protocol_helper.nfs_clusterid
|
nfs_clusterid = self._nfscluster_protocol_helper.nfs_clusterid
|
||||||
|
|
||||||
cluster_info_dict = {
|
cluster_info_dict = {
|
||||||
"nfs_cluster_id": nfs_clusterid,
|
"cluster_id": nfs_clusterid,
|
||||||
}
|
}
|
||||||
|
|
||||||
cluster_info = {"fs-manila": {
|
cluster_info = {"fs-manila": {
|
||||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user