diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-02-12 09:32:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-12 09:32:07 +0100 |
commit | a24d92da6b92345309f07c97231ea1465c0f2686 (patch) | |
tree | b9ce89cc4b2fff5664249acc3039b3bc9ac364e2 | |
parent | 77954df569ca1d58e60bd9880d3fb90f493b0b00 (diff) | |
parent | fb9366ca7c62d5a59317f2db850082e7ac9b16fc (diff) |
Merge pull request #21158 from vespa-engine/mpolden/skip-reserved
Do not offer node moves to reserved hosts
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeMover.java | 2 |
1 files changed, 2 insertions, 0 deletions
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 57db874fb84..552db84748d 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 @@ public abstract class NodeMover<MOVE> extends NodeRepositoryMaintainer { 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; |