diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-08-29 14:06:41 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-08-29 14:06:41 +0200 |
commit | ff75785574b30677ce17984551328990a991869e (patch) | |
tree | 85b7245827d2bc308b597e930bd14c476c5b2497 /configserver | |
parent | 89e6983eb08238e4912aeabb7b001ad966cfb23b (diff) |
Be down initially
Before ths change containers used to come up in the initial VIP state of up
("in rotation") before having any information about downstream cløusters.
This is problematic if the node determines that it should be
down when learning the state of downstream clusters, especially
when it is determining that it should be down due to failing to complete
pings timely due to initialization load.
This changes to starting in the down state. Crucially, this requires
tracking the current state of clusters in a separate component
such that the state survives reconfiguration and we avoid setting the
state down briefly on each reconfiguration.
In addition to the case where there are downstream clusters deciding
the VIP state oif a container, there are two others:
- There are no such clusters. In this case the VIP state will be up by default.
- Some other component is explicitly deciding the VIP state. This commit makes
that case clearer.
Diffstat (limited to 'configserver')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/ConfigServerBootstrap.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ConfigServerBootstrap.java b/configserver/src/main/java/com/yahoo/vespa/config/server/ConfigServerBootstrap.java index 46be61964ce..7ec93c0cf98 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/ConfigServerBootstrap.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/ConfigServerBootstrap.java @@ -39,7 +39,6 @@ import java.util.concurrent.TimeUnit; public class ConfigServerBootstrap extends AbstractComponent implements Runnable { private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(ConfigServerBootstrap.class.getName()); - private static final String vipStatusClusterIdentifier = "configserver"; enum MainThread {START, DO_NOT_START} enum RedeployingApplicationsFails {EXIT_JVM, CONTINUE} @@ -140,18 +139,18 @@ public class ConfigServerBootstrap extends AbstractComponent implements Runnable private void up() { stateMonitor.status(StateMonitor.Status.up); - vipStatus.addToRotation(vipStatusClusterIdentifier); + vipStatus.setInRotation(true); } private void down() { stateMonitor.status(StateMonitor.Status.down); - vipStatus.removeFromRotation(vipStatusClusterIdentifier); + vipStatus.setInRotation(false); } private void initializing() { // This is default value (from config), so not strictly necessary stateMonitor.status(StateMonitor.Status.initializing); - vipStatus.removeFromRotation(vipStatusClusterIdentifier); + vipStatus.setInRotation(false); } private void startRpcServer() { |