diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-10-12 14:22:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 14:22:18 +0200 |
commit | 1788689b408109802bd1e99aa43a025dfe0c4b5e (patch) | |
tree | ed2d327049c314bf9ad790505349c9878e3894eb /controller-server | |
parent | 2c2935b93c5dbe92a330b75cac7700d58b229374 (diff) | |
parent | 1e24e3d86d8c02f9582695da9630b22e8d5efa74 (diff) |
Merge pull request #14814 from vespa-engine/hmusum/remove-use-config-server-vip-flag
Always use config server vip and remove flag
Diffstat (limited to 'controller-server')
2 files changed, 1 insertions, 17 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ProxyRequest.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ProxyRequest.java index a6314df9581..5fd90c83999 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ProxyRequest.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ProxyRequest.java @@ -88,12 +88,6 @@ public class ProxyRequest { return "[targets: " + targets + " request: " + targetPath + "]"; } - /** Create a proxy request that tries all given targets in order */ - public static ProxyRequest tryAll(List<URI> targets, String path, HttpRequest request) { - return new ProxyRequest(request.getMethod(), request.getUri(), request.getJDiscRequest().headers(), - request.getData(), targets, path); - } - /** Create a proxy request that repeatedly tries a single target */ public static ProxyRequest tryOne(URI target, String path, HttpRequest request) { return new ProxyRequest(request.getMethod(), request.getUri(), request.getJDiscRequest().headers(), diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/zone/v2/ZoneApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/zone/v2/ZoneApiHandler.java index 4a245fb3555..37c81f8c2c1 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/zone/v2/ZoneApiHandler.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/zone/v2/ZoneApiHandler.java @@ -11,9 +11,6 @@ import com.yahoo.restapi.Path; import com.yahoo.restapi.SlimeJsonResponse; import com.yahoo.slime.Cursor; import com.yahoo.slime.Slime; -import com.yahoo.vespa.flags.FetchVector; -import com.yahoo.vespa.flags.FlagSource; -import com.yahoo.vespa.flags.Flags; import com.yahoo.vespa.hosted.controller.Controller; import com.yahoo.vespa.hosted.controller.api.integration.ServiceRegistry; import com.yahoo.vespa.hosted.controller.api.integration.zone.ZoneRegistry; @@ -36,14 +33,12 @@ public class ZoneApiHandler extends AuditLoggingRequestHandler { private final ZoneRegistry zoneRegistry; private final ConfigServerRestExecutor proxy; - private final FlagSource flagSource; public ZoneApiHandler(LoggingRequestHandler.Context parentCtx, ServiceRegistry serviceRegistry, ConfigServerRestExecutor proxy, Controller controller) { super(parentCtx, controller.auditLogger()); this.zoneRegistry = serviceRegistry.zoneRegistry(); this.proxy = proxy; - this.flagSource = controller.flagSource(); } @Override @@ -113,12 +108,7 @@ public class ZoneApiHandler extends AuditLoggingRequestHandler { } private ProxyRequest proxyRequest(ZoneId zoneId, String path, HttpRequest request) { - boolean useConfigServerVip = Flags.USE_CONFIG_SERVER_VIP.bindTo(flagSource) - .with(FetchVector.Dimension.ZONE_ID, zoneId.value()).value(); - - return useConfigServerVip - ? ProxyRequest.tryOne(zoneRegistry.getConfigServerVipUri(zoneId), path, request) - : ProxyRequest.tryAll(zoneRegistry.getConfigServerUris(zoneId), path, request); + return ProxyRequest.tryOne(zoneRegistry.getConfigServerVipUri(zoneId), path, request); } } |