Storwize family storage does not allow host identifier start with
a numeric number. Otherwise cinder initialize_connection() API will
throw exception due to such invalid host name in the connector. The fix
is to add a '_' symbol as prefix if the host identifier in connector
starts with non-alphabet letters.
Closes-Bug: #
1233952
Change-Id: Ia88afc373e2635c10c3f6256331a4fd90f51f4b8
raise exception.NoValidHost(reason=msg)
host_name = str(host_name)
+
+ # Storwize family doesn't like hostname that starts with number.
+ if not re.match('^[A-Za-z]', host_name):
+ host_name = '_' + host_name
+
return host_name[:55]
def _find_host_from_wwpn(self, connector):