diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2020-02-27 09:55:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 09:55:14 +0100 |
commit | 21633fe730cfae3be804bdfab9d11ff3416d526e (patch) | |
tree | 00073bc44c8f6452ed504af5d91857e67e391eb8 | |
parent | 3dd2111ecc678769557588f6ed5885ffb0cdecc9 (diff) | |
parent | a3efe2cbe2696df0ce8a610304cd67cb9cbf6923 (diff) |
Merge pull request #12354 from vespa-engine/jvenstad/print-nodes-which-need-new-config-during-installation-step
Print nodes with services which need new config as well
5 files changed, 95 insertions, 5 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/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-details.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-details.json index 9e7eeba8420..6db83522c26 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-details.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-details.json @@ -127,6 +127,81 @@ { "at": "(ignore)", "type": "info", + "message": "host-tenant1:application1:instance1-test.us-east-1: unorchestrated" + }, + { + "at": "(ignore)", + "type": "info", + "message": "--- platform 6.1" + }, + { + "at": "(ignore)", + "type": "info", + "message": "--- container on port 43 has config generation 1, wanted is 2" + }, + { + "at": "(ignore)", + "type": "info", + "message": "host-tenant1:application1:instance1-test.us-east-1: unorchestrated" + }, + { + "at": "(ignore)", + "type": "info", + "message": "--- platform 6.1" + }, + { + "at": "(ignore)", + "type": "info", + "message": "--- container on port 43 has config generation 1, wanted is 2" + }, + { + "at": "(ignore)", + "type": "info", + "message": "host-tenant1:application1:instance1-test.us-east-1: unorchestrated" + }, + { + "at": "(ignore)", + "type": "info", + "message": "--- platform 6.1" + }, + { + "at": "(ignore)", + "type": "info", + "message": "--- container on port 43 has config generation 1, wanted is 2" + }, + { + "at": "(ignore)", + "type": "info", + "message": "host-tenant1:application1:instance1-test.us-east-1: unorchestrated" + }, + { + "at": "(ignore)", + "type": "info", + "message": "--- platform 6.1" + }, + { + "at": "(ignore)", + "type": "info", + "message": "--- container on port 43 has config generation 1, wanted is 2" + }, + { + "at": "(ignore)", + "type": "info", + "message": "host-tenant1:application1:instance1-test.us-east-1: unorchestrated" + }, + { + "at": "(ignore)", + "type": "info", + "message": "--- platform 6.1" + }, + { + "at": "(ignore)", + "type": "info", + "message": "--- container on port 43 has config generation 1, wanted is 2" + }, + { + "at": "(ignore)", + "type": "info", "message": "Found endpoints:" }, { @@ -194,7 +269,7 @@ } ] }, - "lastId": 34, + "lastId": 49, "steps": { "deployTester": { "status": "succeeded", 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> { |