mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-24 18:41:55 +00:00
Explicitly clear logonwaiters on discard of a session
When a session is being discarded, it may inadvertently hold onto logonwaiters. The IPMI session may be reused, but the context is new and those dead contexts can consume memory unreasonably.
This commit is contained in:
parent
55da173b27
commit
e5fff430be
@ -488,6 +488,7 @@ class IpmiHandler(object):
|
||||
try:
|
||||
persistent_ipmicmds[(node, tenant)].close_confluent()
|
||||
persistent_ipmicmds[(node, tenant)].ipmi_session._mark_broken()
|
||||
persistent_ipmicmds[(node, tenant)].ipmi_session.logonwaiters = []
|
||||
except KeyError: # was no previous session
|
||||
pass
|
||||
try:
|
||||
@ -496,7 +497,6 @@ class IpmiHandler(object):
|
||||
userid=connparams['username'],
|
||||
password=connparams['passphrase'], kg=connparams['kg'],
|
||||
port=connparams['port'], onlogon=self.logged)
|
||||
|
||||
ipmisess = persistent_ipmicmds[(node, tenant)].ipmi_session
|
||||
begin = util.monotonic_time()
|
||||
while ((not (ipmisess.broken or self.loggedin)) and
|
||||
|
Loading…
Reference in New Issue
Block a user