From: Lucas Di Pentima Date: Thu, 5 Apr 2018 14:37:49 +0000 (-0300) Subject: 12085: Unconditionally remove the idle time counter of paired missing nodes. X-Git-Tag: 1.1.4~2^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/842c85cde40da0aad5afd5be08821a3b831312f4 12085: Unconditionally remove the idle time counter of paired missing nodes. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/services/nodemanager/arvnodeman/daemon.py b/services/nodemanager/arvnodeman/daemon.py index 3147de328a..1b9f1e70cc 100644 --- a/services/nodemanager/arvnodeman/daemon.py +++ b/services/nodemanager/arvnodeman/daemon.py @@ -215,15 +215,13 @@ class NodeManagerDaemonActor(actor_class): if hasattr(record.cloud_node, "_nodemanager_recently_booted"): self.cloud_nodes.add(record) else: - # Node disappeared from the cloud node list. Stop the monitor - # actor if necessary and forget about the node. + # Node disappeared from the cloud node list. If it's paired, + # remove its idle time counter. + if record.arvados_node: + status.tracker.idle_out(record.arvados_node.get('hostname')) + # Stop the monitor actor if necessary and forget about the node. if record.actor: try: - # If it's paired and idle, stop its idle time counter - # before removing the monitor actor. - if record.actor.get_state().get() == 'idle': - status.tracker.idle_out( - record.actor.arvados_node.get()['hostname']) record.actor.stop() except pykka.ActorDeadError: pass