diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2019-01-05 12:37:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-05 12:37:24 +0100 |
commit | 1a451307afb57326f1768206bf7069b44e97f0cd (patch) | |
tree | b9e101e8c38a0a90131eaa1084eec53be916fd52 | |
parent | c32e44f1838b2741a24fec328644c2b4c7103c40 (diff) | |
parent | b0cd94dbe470ea2928d0bdff4f4e2cbfd558bd27 (diff) |
Merge pull request #8020 from vespa-engine/jvenstad/skip-node-admin-in-service-convergence-check
Skip services with clustername node-admin
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/application/ConfigConvergenceChecker.java | 11 |
1 files changed, 11 insertions, 0 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 113b57328a3..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,8 +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; @@ -66,6 +69,7 @@ public class ConfigConvergenceChecker extends AbstractComponent { application.getModel().getHosts() .forEach(host -> host.getServices().stream() .filter(service -> serviceTypesToCheck.contains(service.getServiceType())) + .filter(service -> ! isHostAdminService(application.getId(), service)) .forEach(service -> getStatePort(service).ifPresent(port -> servicesToCheck.add(service)))); Map<ServiceInfo, Long> currentGenerations = getServiceGenerations(servicesToCheck, timeoutPerService); @@ -169,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 |