From e5fff430bea767bab9949ac2413f96eb57ded594 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 19 Apr 2023 10:22:33 -0400 Subject: [PATCH] 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. --- confluent_server/confluent/plugins/hardwaremanagement/ipmi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index aa956b15..938b69ae 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -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