summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-01-26 16:37:22 +0100
committerJon Marius Venstad <venstad@gmail.com>2020-01-27 08:33:48 +0100
commite2785c3b4ec751cbf3a62640677ed9ea4295a0ec (patch)
tree9433e0d7620ec04d42c8e64820098bcbac2149ee
parentf2d101801cf977220d1cd354e29d65cad9a50877 (diff)
Differentiate between suspended and not nodes, to get timestamps right
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java4
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/NodeList.java7
2 files changed, 8 insertions, 3 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java
index 674ff733bb8..e0b83670027 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java
@@ -380,12 +380,12 @@ public class InternalStepRunner implements StepRunner {
}
if ( ! firstTick)
- logger.log(nodeList.allowedDown().asList().stream()
+ logger.log(nodeList.expectedDown().asList().stream()
.flatMap(node -> nodeDetails(node, false))
.collect(toList()));
controller.jobController().locked(id, lockedRun -> {
- Instant noNodesDownSince = summary.down() == 0 ? lockedRun.noNodesDownSince().orElse(controller.clock().instant()) : null;
+ Instant noNodesDownSince = nodeList.allowedDown().size() == 0 ? lockedRun.noNodesDownSince().orElse(controller.clock().instant()) : null;
return lockedRun.noNodesDownSince(noNodesDownSince).withSummary(summary);
});
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/NodeList.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/NodeList.java
index d3533fc5200..09c672cf3a0 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/NodeList.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/NodeList.java
@@ -68,6 +68,11 @@ public class NodeList extends AbstractFilteringList<NodeWithServices, NodeList>
/** The nodes currently allowed to be down. */
public NodeList allowedDown() {
+ return matching(node -> node.isAllowedDown());
+ }
+
+ /** The nodes currently expected to be down. */
+ public NodeList expectedDown() {
return matching(node -> node.isAllowedDown() || node.isNewlyProvisioned());
}
@@ -83,7 +88,7 @@ public class NodeList extends AbstractFilteringList<NodeWithServices, NodeList>
/** Returns a summary of the convergence status of the nodes in this list. */
public ConvergenceSummary summary() {
- NodeList allowedDown = allowedDown();
+ NodeList allowedDown = expectedDown();
return new ConvergenceSummary(size(),
allowedDown.size(),
withParentDown().needsOsUpgrade().size(),