summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-02-27 08:58:46 +0100
committerJon Marius Venstad <venstad@gmail.com>2020-02-27 08:58:46 +0100
commit6f27ac0d14acd1fe23bc2e132045cd7846204ba3 (patch)
tree0b10523acbbf2ac3cb680bfd009fe0d398125095
parent2019d53e728eee05b33edd7bac99e94f6498e3ff (diff)
Print nodes with services which need new config as well
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java3
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/NodeWithServices.java14
-rw-r--r--vespajlib/src/main/java/com/yahoo/collections/AbstractFilteringList.java2
-rw-r--r--vespajlib/src/test/java/com/yahoo/collections/AbstractFilteringListTest.java4
4 files changed, 19 insertions, 4 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 927ebca67ec..cd1d7796098 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
@@ -398,7 +398,8 @@ public class InternalStepRunner implements StepRunner {
}
if ( ! firstTick)
- logger.log(nodeList.expectedDown().asList().stream()
+ logger.log(nodeList.expectedDown().concat(nodeList.needsNewConfig()).asList().stream()
+ .distinct()
.flatMap(node -> nodeDetails(node, false))
.collect(toList()));
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/NodeWithServices.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/NodeWithServices.java
index 80c1fe0f40b..e3cebfad31c 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/NodeWithServices.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/NodeWithServices.java
@@ -6,6 +6,7 @@ import com.yahoo.vespa.hosted.controller.api.integration.configserver.ServiceCon
import java.time.Instant;
import java.util.List;
+import java.util.Objects;
import static java.util.Objects.requireNonNull;
@@ -79,4 +80,17 @@ public class NodeWithServices {
return services.stream().anyMatch(service -> wantedConfigGeneration > service.currentGeneration());
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ NodeWithServices that = (NodeWithServices) o;
+ return node.equals(that.node);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(node);
+ }
+
}
diff --git a/vespajlib/src/main/java/com/yahoo/collections/AbstractFilteringList.java b/vespajlib/src/main/java/com/yahoo/collections/AbstractFilteringList.java
index b7c6322d951..2e51a4ceafe 100644
--- a/vespajlib/src/main/java/com/yahoo/collections/AbstractFilteringList.java
+++ b/vespajlib/src/main/java/com/yahoo/collections/AbstractFilteringList.java
@@ -63,7 +63,7 @@ public abstract class AbstractFilteringList<Type, ListType extends AbstractFilte
}
/** Returns the union of the two lists. */
- public ListType and(ListType others) {
+ public ListType concat(ListType others) {
return constructor.apply(Stream.concat(items.stream(), others.asList().stream()).collect(toUnmodifiableList()), false);
}
diff --git a/vespajlib/src/test/java/com/yahoo/collections/AbstractFilteringListTest.java b/vespajlib/src/test/java/com/yahoo/collections/AbstractFilteringListTest.java
index 9386bf7256f..3524f507701 100644
--- a/vespajlib/src/test/java/com/yahoo/collections/AbstractFilteringListTest.java
+++ b/vespajlib/src/test/java/com/yahoo/collections/AbstractFilteringListTest.java
@@ -48,8 +48,8 @@ public class AbstractFilteringListTest {
assertEquals(List.of("abc", "cba", "bbb"),
list.not().in(MyList.of("ABC", "CBA")).asList());
- assertEquals(List.of("ABC", "abc", "cba", "bbb", "ABC", "aaa"),
- list.and(MyList.of("aaa")).asList());
+ assertEquals(List.of("ABC", "abc", "cba", "bbb", "ABC", "aaa", "ABC"),
+ list.concat(MyList.of("aaa", "ABC")).asList());
}
private static class MyList extends AbstractFilteringList<String, MyList> {