aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java
diff options
context:
space:
mode:
Diffstat (limited to 'controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java
index d3daa68741e..f264251361a 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java
@@ -12,8 +12,11 @@ import java.util.List;
*
* @author mpolden
*/
-public enum SystemApplication {
+public enum SystemApplication {
+ // Note that the enum declaration order decides the upgrade order
+ configServerHost(ApplicationId.from("hosted-vespa", "configserver-host", "default"), NodeType.confighost),
+ proxyHost(ApplicationId.from("hosted-vespa", "proxy-host", "default"), NodeType.proxyhost),
configServer(ApplicationId.from("hosted-vespa", "zone-config-servers", "default"), NodeType.config),
zone(ApplicationId.from("hosted-vespa", "routing", "default"), NodeType.proxy);
@@ -34,11 +37,16 @@ public enum SystemApplication {
return nodeType;
}
- /** Returns whether this system application has its own application package */
+ /** Returns whether this system application has an application package */
public boolean hasApplicationPackage() {
return nodeType == NodeType.proxy;
}
+ /** Returns whether this system application must be upgraded in the declared order */
+ public boolean upgradeInOrder() {
+ return nodeType != NodeType.confighost && nodeType != NodeType.proxyhost;
+ }
+
/** All known system applications */
public static List<SystemApplication> all() {
return Arrays.asList(values());