diff options
author | Harald Musum <musum@oath.com> | 2018-04-25 13:08:34 +0200 |
---|---|---|
committer | Harald Musum <musum@oath.com> | 2018-04-25 13:08:34 +0200 |
commit | 48105b306db196df81257a1b7e0c7da7b3789103 (patch) | |
tree | ccfb3221268891b490dac2fcde5f46e27ecb2301 /controller-server | |
parent | c3711c9da125cd3c8d60ea8f22518eb641e5d334 (diff) |
Add config server VIP to list of servers to use if it exists (AWS only for now)
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ConfigServerRestExecutorImpl.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ConfigServerRestExecutorImpl.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ConfigServerRestExecutorImpl.java index 06dc29b3b70..9019b4ae4c5 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ConfigServerRestExecutorImpl.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ConfigServerRestExecutorImpl.java @@ -82,6 +82,15 @@ public class ConfigServerRestExecutorImpl implements ConfigServerRestExecutor { // Make a local copy of the list as we want to manipulate it in case of ping problems. List<URI> allServers = new ArrayList<>(zoneRegistry.getConfigServerUris(zoneId)); + // TODO: Use config server VIP for all zones that have one + + // For now, just add config server VIP as first element in list of servers if it exists + if (zoneId.region().value().startsWith("aws-") + || zoneId.region().value().startsWith("cd-aws-") + || zoneId.region().value().equals("cd-us-east-1a")) { + zoneRegistry.getConfigServerVipUri(zoneId).ifPresent(uri -> allServers.add(0, uri)); + } + StringBuilder errorBuilder = new StringBuilder(); if (queueFirstServerIfDown(allServers, proxyRequest)) { errorBuilder.append("Change ordering due to failed ping."); |