From fb9366ca7c62d5a59317f2db850082e7ac9b16fc Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Fri, 11 Feb 2022 15:00:48 +0100 Subject: [PATCH] Do not offer node moves to reserved hosts --- .../com/yahoo/vespa/hosted/provision/maintenance/NodeMover.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeMover.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeMover.java index 57db874fb848..552db84748d1 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeMover.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeMover.java @@ -74,6 +74,8 @@ protected final MOVE findBestMove(NodesAndHosts allNodes) { if (deployedRecently(applicationId)) continue; for (HostWithResources toHost : hostResources) { if (toHost.node.hostname().equals(node.parentHostname().get())) continue; + if (toHost.node.reservedTo().isPresent() && + !toHost.node.reservedTo().get().equals(applicationId.tenant())) continue; // Reserved to a different tenant if (spares.contains(toHost.node)) continue; // Do not offer spares as a valid move as they are reserved for replacement of failed nodes if ( ! toHost.hasCapacity(node.resources())) continue;