summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2019-01-05 11:06:13 +0100
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2019-01-05 11:06:13 +0100
commitb0cd94dbe470ea2928d0bdff4f4e2cbfd558bd27 (patch)
tree1002ff72eae676aeb5325bf5a2668400ab098f4d /configserver
parentb8721ee376f585a9aa82b64948dccd40768afd64 (diff)
Make sure node-admin thing is also routing app
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/application/ConfigConvergenceChecker.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/application/ConfigConvergenceChecker.java b/configserver/src/main/java/com/yahoo/vespa/config/server/application/ConfigConvergenceChecker.java
index da27a628f90..5f64ce12d2d 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/application/ConfigConvergenceChecker.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/application/ConfigConvergenceChecker.java
@@ -7,9 +7,11 @@ import com.yahoo.component.AbstractComponent;
import com.yahoo.config.model.api.HostInfo;
import com.yahoo.config.model.api.PortInfo;
import com.yahoo.config.model.api.ServiceInfo;
+import com.yahoo.config.provision.ApplicationId;
import com.yahoo.slime.Cursor;
import com.yahoo.vespa.applicationmodel.ClusterId;
import com.yahoo.vespa.config.server.http.JSONResponse;
+import com.yahoo.vespa.orchestrator.model.VespaModelUtil;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.proxy.WebResourceFactory;
@@ -67,7 +69,7 @@ public class ConfigConvergenceChecker extends AbstractComponent {
application.getModel().getHosts()
.forEach(host -> host.getServices().stream()
.filter(service -> serviceTypesToCheck.contains(service.getServiceType()))
- .filter(service -> ! service.getProperty("clustername").map(ClusterId.NODE_ADMIN.s()::equals).orElse(false))
+ .filter(service -> ! isHostAdminService(application.getId(), service))
.forEach(service -> getStatePort(service).ifPresent(port -> servicesToCheck.add(service))));
Map<ServiceInfo, Long> currentGenerations = getServiceGenerations(servicesToCheck, timeoutPerService);
@@ -171,6 +173,13 @@ public class ConfigConvergenceChecker extends AbstractComponent {
return WebResourceFactory.newResource(StateApi.class, target);
}
+ private static boolean isHostAdminService(ApplicationId id, ServiceInfo service) {
+ return VespaModelUtil.ZONE_APPLICATION_ID.equals(id)
+ && service.getProperty("clustername")
+ .map(ClusterId.NODE_ADMIN.s()::equals)
+ .orElse(false);
+ }
+
private static class ServiceListResponse extends JSONResponse {
// Pre-condition: servicesToCheck has a state port