HPE 3par: getWsApiVersion login/logout
After logging in to WSAPI with getWsApiVersion(), ensure you call logout() to prevent exhausting the server's connection limit. This patch corrects a regression introduced by I30f105ee619386f52bc907f5115c08e0fafb9e42 Change-Id: Iec30d048b4b18cb2013005fb36484b2808030690
This commit is contained in:
parent
02980528fb
commit
f1f64d9e74
@ -698,7 +698,9 @@ class HPE3PARBaseDriver(test.TestCase):
|
|||||||
mock.call.login(HPE3PAR_USER_NAME, HPE3PAR_USER_PASS)]
|
mock.call.login(HPE3PAR_USER_NAME, HPE3PAR_USER_PASS)]
|
||||||
|
|
||||||
get_id_login = [
|
get_id_login = [
|
||||||
|
mock.call.login(HPE3PAR_USER_NAME, HPE3PAR_USER_PASS),
|
||||||
mock.call.getWsApiVersion(),
|
mock.call.getWsApiVersion(),
|
||||||
|
mock.call.logout(),
|
||||||
mock.call.login(HPE3PAR_USER_NAME, HPE3PAR_USER_PASS),
|
mock.call.login(HPE3PAR_USER_NAME, HPE3PAR_USER_PASS),
|
||||||
mock.call.getStorageSystemInfo()]
|
mock.call.getStorageSystemInfo()]
|
||||||
|
|
||||||
|
@ -310,11 +310,12 @@ class HPE3PARCommon(object):
|
|||||||
4.0.20 - Use small QoS Latency value. Bug #2018994
|
4.0.20 - Use small QoS Latency value. Bug #2018994
|
||||||
4.0.21 - Fix issue seen during retype/migrate. Bug #2026718
|
4.0.21 - Fix issue seen during retype/migrate. Bug #2026718
|
||||||
4.0.22 - Fixed clone of replicated volume. Bug #2021941
|
4.0.22 - Fixed clone of replicated volume. Bug #2021941
|
||||||
|
4.0.23 - Fixed login/logout while accessing wsapi. Bug #2068795
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
VERSION = "4.0.22"
|
VERSION = "4.0.23"
|
||||||
|
|
||||||
stats = {}
|
stats = {}
|
||||||
|
|
||||||
@ -436,8 +437,9 @@ class HPE3PARCommon(object):
|
|||||||
raise exception.InvalidInput(reason=msg)
|
raise exception.InvalidInput(reason=msg)
|
||||||
|
|
||||||
def client_logout(self):
|
def client_logout(self):
|
||||||
LOG.debug("Disconnect from 3PAR REST and SSH %s", self.uuid)
|
if self.client is not None:
|
||||||
self.client.logout()
|
LOG.debug("Disconnect from 3PAR REST and SSH %s", self.uuid)
|
||||||
|
self.client.logout()
|
||||||
|
|
||||||
def _create_replication_client(self, remote_array):
|
def _create_replication_client(self, remote_array):
|
||||||
try:
|
try:
|
||||||
@ -492,6 +494,8 @@ class HPE3PARCommon(object):
|
|||||||
if self._replication_enabled:
|
if self._replication_enabled:
|
||||||
self.client = None
|
self.client = None
|
||||||
raise exception.InvalidInput(ex)
|
raise exception.InvalidInput(ex)
|
||||||
|
finally:
|
||||||
|
self.client_logout()
|
||||||
|
|
||||||
if context:
|
if context:
|
||||||
# The context is None except at driver startup.
|
# The context is None except at driver startup.
|
||||||
|
Loading…
Reference in New Issue
Block a user