Merge "Adapt CephFS driver to do not try to escape export ip"
This commit is contained in:
commit
a659470852
|
@ -987,9 +987,16 @@ class NFSProtocolHelper(ganesha.GaneshaNASHelper2):
|
||||||
def get_export_locations(self, share, subvolume_path):
|
def get_export_locations(self, share, subvolume_path):
|
||||||
export_locations = []
|
export_locations = []
|
||||||
for export_ip in self.export_ips:
|
for export_ip in self.export_ips:
|
||||||
|
# Try to escape the export ip. If it fails, means that the
|
||||||
|
# `cephfs_ganesha_server_ip` wasn't possibly set and the used
|
||||||
|
# address is the hostname
|
||||||
|
try:
|
||||||
|
server_address = driver_helpers.escaped_address(export_ip)
|
||||||
|
except ValueError:
|
||||||
|
server_address = export_ip
|
||||||
|
|
||||||
export_path = "{server_address}:{mount_path}".format(
|
export_path = "{server_address}:{mount_path}".format(
|
||||||
server_address=driver_helpers.escaped_address(export_ip),
|
server_address=server_address, mount_path=subvolume_path)
|
||||||
mount_path=subvolume_path)
|
|
||||||
|
|
||||||
LOG.info("Calculated export path for share %(id)s: %(epath)s",
|
LOG.info("Calculated export path for share %(id)s: %(epath)s",
|
||||||
{"id": share['id'], "epath": export_path})
|
{"id": share['id'], "epath": export_path})
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
When ``cephfs_ganesha_server_ip`` is not set, the current hostname is used
|
||||||
|
as a default for such config option. The driver was treating this value
|
||||||
|
as an IP address and trying to perform validations on it. The CEPH NFS
|
||||||
|
driver will no longer treat hostnames as ip addresses and try to validate
|
||||||
|
them as such.
|
Loading…
Reference in New Issue