Add extra logging around tenant reconfiguration events

While tracking down a problem, I observed a tenant reconfiguration
event apparently go missing.  This change adds log messages that
might aid debugging in such a situation.

Change-Id: Ia975f83b6bba8d48994cd8c39427be2db3d73262
This commit is contained in:
James E. Blair 2022-10-03 14:32:55 -07:00
parent 81178dcfc8
commit 0cceabde1f

View File

@ -1453,6 +1453,7 @@ class Scheduler(threading.Thread):
# This is called in the scheduler loop after another thread submits
# a request
if self.unparsed_abide.ltime < self.system_config_cache.ltime:
self.log.debug("Updating system config")
self.updateSystemConfig()
with self.layout_lock:
@ -2394,11 +2395,14 @@ class Scheduler(threading.Thread):
event_forwarded = False
try:
if isinstance(event, TenantReconfigureEvent):
self.log.debug("Processing tenant reconfiguration "
"event for tenant %s", tenant.name)
self._doTenantReconfigureEvent(event)
elif isinstance(event, (PromoteEvent, ChangeManagementEvent)):
event_forwarded = self._forward_management_event(event)
else:
self.log.error("Unable to handle event %s", event)
self.log.error("Unable to handle event %s for tenant %s",
event, tenant.name)
finally:
if event_forwarded:
self.management_events[tenant.name].ackWithoutResult(