diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-04-08 14:56:34 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-04-08 14:56:34 +0200 |
commit | e969caac12895478af9ef627c84abce90d2f21ef (patch) | |
tree | e428a8b796fb25ec101622e00933ce311e440826 /node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java | |
parent | 0f8387d7f21d392f9d7ab5ee60b10acce1dff4d8 (diff) |
Move nodes to 'failed' during activate
Diffstat (limited to 'node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java index 197193fafa9..e09ad4d6e4e 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java @@ -91,6 +91,11 @@ public class NodeList extends AbstractFilteringList<Node, NodeList> { !node.status().vespaVersion().get().equals(node.allocation().get().membership().cluster().vespaVersion())); } + /** Returns the subset of nodes with want to fail status matching the given value */ + public NodeList wantToFail(boolean wantToFail) { + return matching(node -> node.status().wantToFail() == wantToFail); + } + /** Returns the subset of nodes that are currently changing their OS version to given version */ public NodeList changingOsVersionTo(Version version) { return matching(node -> node.status().osVersion().changingTo(version)); |