Remove special handling of node-admin in ConfigConvergenceChecker
@@ -7,7 +7,6 @@ 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.log.LogLevel;
import com.yahoo.slime.Cursor;
import com.yahoo.vespa.config.server.http.JSONResponse;
@@ -23,13 +22,12 @@ import javax.ws.rs.client.WebTarget;
import java.net.URI;
import java.time.Duration;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
+import java.util.logging.Logger;
import java.util.stream.Collectors;
import static com.yahoo.config.model.api.container.ContainerServiceType.CONTAINER;
@@ -44,18 +42,17 @@ import static com.yahoo.config.model.api.container.ContainerServiceType.QRSERVER
*/
public class ConfigConvergenceChecker extends AbstractComponent {
- private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(ConfigConvergenceChecker.class.getName());
- private static final ApplicationId routingApplicationId = ApplicationId.from("hosted-vespa", "routing", "default");
+ private static final Logger log = Logger.getLogger(ConfigConvergenceChecker.class.getName());
private static final String statePath = "/state/v1/";
private static final String configSubPath = "config";
- private final static Set<String> serviceTypesToCheck = new HashSet<>(Arrays.asList(
+ private final static Set<String> serviceTypesToCheck = Set.of(
CONTAINER.serviceName,
QRSERVER.serviceName,
LOGSERVER_CONTAINER.serviceName,
"searchnode",
"storagenode",
"distributor"
- ));
+ );
private final StateApiFactory stateApiFactory;
@@ -75,9 +72,6 @@ public class ConfigConvergenceChecker extends AbstractComponent {
application.getModel().getHosts()
.forEach(host -> host.getServices().stream()
.filter(service -> serviceTypesToCheck.contains(service.getServiceType()))
-
- // TODO: Remove after removing tenant hosts from zone-app
- .filter(service -> ! isHostAdminService(application.getId(), service))
.forEach(service -> getStatePort(service).ifPresent(port -> servicesToCheck.add(service))));
Map<ServiceInfo, Long> currentGenerations = getServiceGenerations(servicesToCheck, timeoutPerService);
@@ -181,13 +175,6 @@ public class ConfigConvergenceChecker extends AbstractComponent {
return WebResourceFactory.newResource(StateApi.class, target);
}
- private static boolean isHostAdminService(ApplicationId id, ServiceInfo service) {
- return routingApplicationId.equals(id)
- && service.getProperty("clustername")
- .map("node-admin"::equals)
- .orElse(false);
- }
-
private static class ServiceListResponse extends JSONResponse {
// Pre-condition: servicesToCheck has a state port
