From 842c85cde40da0aad5afd5be08821a3b831312f4 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Thu, 5 Apr 2018 11:37:49 -0300 Subject: [PATCH] 12085: Unconditionally remove the idle time counter of paired missing nodes. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- services/nodemanager/arvnodeman/daemon.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 -- 2.30.2