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 e33953a891)
This commit is contained in:
Victoria Martinez de la Cruz 2022-10-13 18:43:29 +00:00 committed by Goutham Pacha Ravi
parent c86aeddd70
commit 95f0517709
3 changed files with 11 additions and 2 deletions

View File

@ -1112,7 +1112,8 @@ class NFSProtocolHelper(NFSProtocolHelperMixin, 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):

View File

@ -1169,7 +1169,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'

View File

@ -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.