summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorValerij Fredriksen <valerijf@verizonmedia.com>2019-06-04 11:22:42 +0200
committerValerij Fredriksen <valerijf@verizonmedia.com>2019-06-04 11:22:42 +0200
commitdd359e0143899abbcfeef5922985c936ff24ed73 (patch)
tree950f9a46a6a9f8406da0a7c1a4106979976ec46c /configserver
parent8587e088b0f1fda759fb1a394f15f9f0aa415e06 (diff)
Special handle the tenant-host application where needed
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
index 0ceec0ab00b..75b0519032e 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
@@ -80,6 +80,7 @@ import java.util.stream.Collectors;
import static com.yahoo.config.model.api.container.ContainerServiceType.CLUSTERCONTROLLER_CONTAINER;
import static com.yahoo.config.model.api.container.ContainerServiceType.CONTAINER;
import static com.yahoo.config.model.api.container.ContainerServiceType.LOGSERVER_CONTAINER;
+import static com.yahoo.vespa.config.server.tenant.TenantRepository.HOSTED_VESPA_TENANT;
import static java.nio.file.Files.readAttributes;
/**
@@ -605,7 +606,7 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye
return tenantRepository.getAllTenantNames().stream()
.filter(tenantName -> activeApplications(tenantName).isEmpty())
.filter(tenantName -> !tenantName.equals(TenantName.defaultName())) // Not allowed to remove 'default' tenant
- .filter(tenantName -> !tenantName.equals(TenantRepository.HOSTED_VESPA_TENANT)) // Not allowed to remove 'hosted-vespa' tenant
+ .filter(tenantName -> !tenantName.equals(HOSTED_VESPA_TENANT)) // Not allowed to remove 'hosted-vespa' tenant
.filter(tenantName -> tenantRepository.getTenant(tenantName).getCreatedTime().isBefore(now.minus(ttlForUnusedTenant)))
.peek(tenantRepository::deleteTenant)
.collect(Collectors.toSet());
@@ -777,7 +778,7 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye
static Version decideVersion(ApplicationId application, Environment environment, Version sessionVersion, boolean bootstrap) {
if ( environment.isManuallyDeployed()
&& sessionVersion.getMajor() == Vtag.currentVersion.getMajor()
- && ! "hosted-vespa".equals(application.tenant().value()) // Never change version of system applications
+ && ! HOSTED_VESPA_TENANT.equals(application.tenant()) // Never change version of system applications
&& ! application.instance().isTester() // Never upgrade tester containers
&& ! bootstrap) { // Do not use current version when bootstrapping config server
return Vtag.currentVersion;