aboutsummaryrefslogtreecommitdiffstats
path: root/service-monitor
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2021-03-01 14:09:20 +0100
committerMartin Polden <mpolden@mpolden.no>2021-03-01 14:47:35 +0100
commit44bf840f391d5d3f098292a3f4696a0cabf3004a (patch)
tree4befdb8bb64b4c1f6be46bbd21cffba611f4b523 /service-monitor
parent0089364e9dd45bbddf71de279df47a76e1e04e8a (diff)
Make ConfigServerApplication and ControllerApplication stateful
Diffstat (limited to 'service-monitor')
-rw-r--r--service-monitor/src/main/java/com/yahoo/vespa/service/duper/ConfigServerApplication.java14
-rw-r--r--service-monitor/src/main/java/com/yahoo/vespa/service/duper/ControllerApplication.java14
2 files changed, 28 insertions, 0 deletions
diff --git a/service-monitor/src/main/java/com/yahoo/vespa/service/duper/ConfigServerApplication.java b/service-monitor/src/main/java/com/yahoo/vespa/service/duper/ConfigServerApplication.java
index 25479b7b03a..2889f336d73 100644
--- a/service-monitor/src/main/java/com/yahoo/vespa/service/duper/ConfigServerApplication.java
+++ b/service-monitor/src/main/java/com/yahoo/vespa/service/duper/ConfigServerApplication.java
@@ -1,15 +1,29 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.service.duper;
+import com.yahoo.component.Version;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.NodeType;
import com.yahoo.vespa.applicationmodel.ServiceType;
/**
* A service/application model of the config server with health status.
+ *
+ * @author hakonhall
*/
public class ConfigServerApplication extends ConfigServerLikeApplication {
+
public ConfigServerApplication() {
super("zone-config-servers", NodeType.config, ClusterSpec.Type.admin, ServiceType.CONFIG_SERVER);
}
+
+ @Override
+ public ClusterSpec getClusterSpecWithVersion(Version version) {
+ return ClusterSpec.request(getClusterSpecType(), getClusterSpecId())
+ .vespaVersion(version)
+ .stateful(true)
+ .exclusive(true)
+ .build();
+ }
+
}
diff --git a/service-monitor/src/main/java/com/yahoo/vespa/service/duper/ControllerApplication.java b/service-monitor/src/main/java/com/yahoo/vespa/service/duper/ControllerApplication.java
index 3d69b1c9925..9b6496fa5b8 100644
--- a/service-monitor/src/main/java/com/yahoo/vespa/service/duper/ControllerApplication.java
+++ b/service-monitor/src/main/java/com/yahoo/vespa/service/duper/ControllerApplication.java
@@ -1,15 +1,29 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.service.duper;
+import com.yahoo.component.Version;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.NodeType;
import com.yahoo.vespa.applicationmodel.ServiceType;
/**
+ * A service/application model of the controller with health status.
+ *
* @author mpolden
*/
public class ControllerApplication extends ConfigServerLikeApplication {
+
public ControllerApplication() {
super("controller", NodeType.controller, ClusterSpec.Type.container, ServiceType.CONTROLLER);
}
+
+ @Override
+ public ClusterSpec getClusterSpecWithVersion(Version version) {
+ return ClusterSpec.request(getClusterSpecType(), getClusterSpecId())
+ .vespaVersion(version)
+ .stateful(true)
+ .exclusive(true)
+ .build();
+ }
+
}