From 30abb5d9fe47fb98be20489176ec9a4962ade491 Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Fri, 16 Apr 2021 08:29:22 +0200 Subject: Remove implicit reboot of nodes moving to dirty --- .../hosted/provision/persistence/CuratorDatabaseClient.java | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'node-repository/src/main/java/com') diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClient.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClient.java index 3ed29e14527..2d8ab74ce71 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClient.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClient.java @@ -246,21 +246,9 @@ public class CuratorDatabaseClient { private Status newNodeStatus(Node node, Node.State toState) { if (node.state() != Node.State.failed && toState == Node.State.failed) return node.status().withIncreasedFailCount(); if (node.state() == Node.State.failed && toState == Node.State.active) return node.status().withDecreasedFailCount(); // fail undo - if (rebootOnTransitionTo(toState, node)) { - return node.status().withReboot(node.status().reboot().withIncreasedWanted()); - } return node.status(); } - /** Returns whether to reboot node as part of transition to given state. This is done to get rid of any lingering - * unwanted state (e.g. processes) on non-host nodes. */ - private boolean rebootOnTransitionTo(Node.State state, Node node) { - if (node.type().isHost()) return false; // Reboot of host nodes is handled by NodeRebooter - if (zone.environment().isTest()) return false; // We want to reuse nodes quickly in test environments - - return node.state() != Node.State.dirty && state == Node.State.dirty; - } - /** * Returns all nodes which are in one of the given states. * If no states are given this returns all nodes. -- cgit v1.2.3