[IBM DS8000]: Fix compatability issue in get_host

get_host" checks for "os_type" and sets host type for DS8000, "os_type"
returned from python2.7 is "linux2" and from python3 is "linux". This
will lead the get_host to set the wrong host type.

Modified get_host to include "linux" in "os_type" check and removed the
"OShost" tag for host name.

Closes-Bug: #1903648
Change-Id: Ibafecf204465132d64d28102acbcc311079b65f8
This commit is contained in:
GirishChilukuri 2020-12-02 06:21:37 +00:00
parent 075ab6c85f
commit d729522acb
2 changed files with 8 additions and 2 deletions

View File

@ -587,7 +587,7 @@ class DS8KCommonHelper(object):
def _get_host(self, connector):
# DS8K doesn't support hostname which is longer than 32 chars.
hname = ('OShost:%s' % filter_alnum(connector['host']))[:32]
hname = filter_alnum(connector['host'])[:32]
os_type = connector.get('os_type')
platform = connector.get('platform')
@ -597,7 +597,7 @@ class DS8KCommonHelper(object):
htype = 'iSeries'
elif os_type == 'AIX':
htype = 'pSeries'
elif platform in ('s390', 's390x') and os_type == 'linux2':
elif platform in ('s390', 's390x') and os_type in ('linux', 'linux2'):
htype = 'zLinux'
else:
htype = 'LinuxRHEL'

View File

@ -0,0 +1,6 @@
---
fixes:
- |
IBM DS8000 Driver `Bug #1903648
<https://bugs.launchpad.net/cinder/+bug/1903648>`_:
Fix os_type compatability and hostname template issue.