From dfb498e7977fda2c0c16d7c6e1d20a0b42728fd6 Mon Sep 17 00:00:00 2001 From: Tobias Henkel Date: Fri, 9 Jun 2023 11:15:28 +0200 Subject: [PATCH] Fix typo that crashes playback worker when under load When reaching the warning level of the playback worker it crashes with an exception [1]. The reason is a typo in the variable initialization. [1] Trace Exception in thread Thread-6 (_playbackWorker): Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/opt/nodepool/lib/python3.10/site-packages/nodepool/zk/zookeeper.py", line 926, in _playbackWorker if now - self._last_playback_warning > 60: AttributeError: 'NodeCache' object has no attribute '_last_playback_warning'. Did you mean: '_last_playblack_warning'? Change-Id: Ib52d475edaebb960f2350cca0f61df779539873f --- nodepool/zk/zookeeper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodepool/zk/zookeeper.py b/nodepool/zk/zookeeper.py index 3af823b0b..8c0fe9a85 100644 --- a/nodepool/zk/zookeeper.py +++ b/nodepool/zk/zookeeper.py @@ -742,7 +742,7 @@ class NodepoolTreeCache(abc.ABC): self.zk = zk self.root = root self._last_event_warning = time.monotonic() - self._last_playblack_warning = time.monotonic() + self._last_playback_warning = time.monotonic() self._cached_objects = {} self._cached_paths = set() self._ready = threading.Event()