Add filesystem info to FSAL in CephFS NFS

The filesystem information was missing from the exports
in the CephFS NFS driver. Because of this, the exports
were created on the first available filesystem.

This generates inconsistencies in deployments in which more than
one filesystem is being used.

This patch set adds the filesystem information in the
created exports.

Closes-Bug: #1991938
Change-Id: I639640f738571c77ea9bb1fbf60749c00ffcbd3b
(cherry picked from commit e33953a891182b7128660a06f1c7f29532cc36e9)
(cherry picked from commit 95f051770964c946004b803f5e2ba99aa2b96499)
(cherry picked from commit c57b292c8ec0c54d4c45f5e41cf9ee6f6faa47ee)
This commit is contained in:
Victoria Martinez de la Cruz 2022-10-13 18:43:29 +00:00 committed by Goutham Pacha Ravi
parent f16183b192
commit 9d097fa4ea
3 changed files with 11 additions and 2 deletions
manila
share/drivers/cephfs
tests/share/drivers/cephfs
releasenotes/notes

@ -1055,7 +1055,8 @@ class NFSProtocolHelper(ganesha.GaneshaNASHelper2):
return {
'Name': 'Ceph',
'User_Id': ceph_auth_id,
'Secret_Access_Key': auth_result
'Secret_Access_Key': auth_result,
'Filesystem': self.volname
}
def _cleanup_fsal_hook(self, base, share, access):

@ -1150,7 +1150,8 @@ class NFSProtocolHelperTestCase(test.TestCase):
expected_ret = {
"Name": "Ceph",
"User_Id": "ganesha-fakeid",
"Secret_Access_Key": "ganesha-zorilla"
"Secret_Access_Key": "ganesha-zorilla",
"Filesystem": self._nfs_helper.volname
}
driver.rados_command.return_value = 'ganesha-zorilla'

@ -0,0 +1,7 @@
---
fixes:
- |
Add the filesystem info in the exports created by the CephFS NFS driver.
This fixes inconsistencies when deploying Manila with CephFS NFS with
multiple filesystems.