From da77382f32ebe1f7f028054482fa1dceb1703530 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Wed, 14 Sep 2016 11:13:14 -0600 Subject: [PATCH] Add iscsi port to sf_svip arg if not provided With things like VLAN support it may be necessary for an admin to specify the sf_svip (IP) address. The problem is that when this is specified if the admin forgets to include the port suffix to the SVIP address it may not work on certain distros (inparticular RHEL variants). This patch just adds a simple check when the endpoint is created to make sure the port suffix is included, if it's not it automatically adds the default 3260. NOTE: This is not a backport, the Cheesecake code has an inadvertent fix (albeit it could be improved) that didn't merge in Mitaka. Change-Id: Id2a99ff927d1fb9e40fab10beb0db5e4f302ae70 Closes-Bug: #1619941 --- cinder/volume/drivers/solidfire.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py index 4d143bbe4..d1985d357 100644 --- a/cinder/volume/drivers/solidfire.py +++ b/cinder/volume/drivers/solidfire.py @@ -411,9 +411,16 @@ class SolidFireDriver(san.SanISCSIDriver): """Gets the connection info for specified account and volume.""" cluster_info = self._get_cluster_info() if self.configuration.sf_svip is None: - iscsi_portal = cluster_info['clusterInfo']['svip'] + ':3260' + iscsi_portal = cluster_info['clusterInfo']['svip'] else: iscsi_portal = self.configuration.sf_svip + + # NOTE(jdg): some systems get irritated if there's no + # port indicated, and we don't enforce it on the config + # option so add the default here if it's missing + if ':' not in iscsi_portal: + iscsi_portal += ':3260' + chap_secret = sfaccount['targetSecret'] found_volume = False