Skip to content

Commit

Permalink
3PAR driver terminate connection host validation
Browse files Browse the repository at this point in the history
The 3PAR backend does not allow FQDN host names (i.e. foo.rose.hp.com),
instead it requires just foo without the rose.hp.com. This patch will
now validate the host name in terminate connection by calling
_safe_host just as it was doing in initialize connection when creating
the host on the 3PAR backend.

Change-Id: I52e90938c782473edc93f30672a0530ab5934edc
Fixes: bug 1214994
  • Loading branch information
kumartin committed Aug 21, 2013
1 parent d2b48cd commit 5a49640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cinder/volume/drivers/san/hp/hp_3par_fc.py
Expand Up @@ -193,8 +193,8 @@ def initialize_connection(self, volume, connector):
def terminate_connection(self, volume, connector, **kwargs):
"""Driver entry point to unattach a volume from an instance."""
self.common.client_login()
self.common.terminate_connection(volume,
connector['host'],
hostname = self.common._safe_hostname(connector['host'])
self.common.terminate_connection(volume, hostname,
connector['wwpns'])
self.common.client_logout()

Expand Down
4 changes: 2 additions & 2 deletions cinder/volume/drivers/san/hp/hp_3par_iscsi.py
Expand Up @@ -252,8 +252,8 @@ def initialize_connection(self, volume, connector):
def terminate_connection(self, volume, connector, **kwargs):
"""Driver entry point to unattach a volume from an instance."""
self.common.client_login()
self.common.terminate_connection(volume,
connector['host'],
hostname = self.common._safe_hostname(connector['host'])
self.common.terminate_connection(volume, hostname,
connector['initiator'])
self.common.client_logout()

Expand Down

0 comments on commit 5a49640

Please sign in to comment.