glusterfs/ganesha: add symbolic access-id to export location

With Ganesha the actual location where the storage backend entities
are exported include the id of the access rule on behalf of which
the export is made; see

http://docs.openstack.org/developer/manila/devref/ganesha.html#known-issues
https://review.openstack.org/#/c/249998/2/doc/source/devref/ganesha.rst

Thus the export location reported through the Manila API/UI
is inaccurate and current Manila interface is not capable of
a faithful representation of the actual export mechanism
(as the exposed export location values depend only on the share but
noot on the acces rules).

We can at least try to find partial representations that give
more clue than a straightaway false export location value.
With this patch we make such attempt, using export locations
of the format

  example.com:/share-6c0262e8-f989-4df1-9f01-c758b0d72428--<access-id>

Change-Id: I029a28341225087101920c3792e9b2fb4beed081
Closes-Bug: #1501178
This commit is contained in:
Csaba Henk 2016-03-01 01:46:51 +01:00
parent 83d7bc60f4
commit e4d9f56f14
2 changed files with 2 additions and 2 deletions

View File

@ -330,7 +330,7 @@ class GaneshaNFSHelper(ganesha.GaneshaNASHelper):
**kwargs)
def get_export(self, share):
return ':/'.join((self.ganesha_host, share['name']))
return ':/'.join((self.ganesha_host, share['name'] + "--<access-id>"))
def init_helper(self):
@utils.synchronized(self.tag)

View File

@ -542,7 +542,7 @@ class GaneshaNFSHelperTestCase(test.TestCase):
def test_get_export(self):
ret = self._helper.get_export(self.share)
self.assertEqual('example.com:/fakename', ret)
self.assertEqual('example.com:/fakename--<access-id>', ret)
def test_init_remote_ganesha_server(self):
ssh_execute = mock.Mock(return_value=('', ''))