summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-03-05 15:06:13 +0100
committerJon Marius Venstad <venstad@gmail.com>2021-03-05 15:20:19 +0100
commit35390b007c102370bbad7490cc1cb5542dc1ad17 (patch)
tree32eaab4baf16cb8ac1044f3767e3ca6e5b216d37 /configserver
parent949df298d5a012aa5900e8c23f92e6e78a25b120 (diff)
Stop writing dedicated CC data to ZK
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/application/ApplicationCuratorDatabase.java5
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/Session.java8
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionPreparer.java12
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java2
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClient.java15
5 files changed, 4 insertions, 38 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/application/ApplicationCuratorDatabase.java b/configserver/src/main/java/com/yahoo/vespa/config/server/application/ApplicationCuratorDatabase.java
index 97b96fa91a0..2edd0d9fc2a 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/application/ApplicationCuratorDatabase.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/application/ApplicationCuratorDatabase.java
@@ -79,7 +79,6 @@ public class ApplicationCuratorDatabase {
try (Lock lock = lock(id)) {
curator.create(applicationPath(id));
modifyReindexing(id, ApplicationReindexing.empty(), UnaryOperator.identity());
- setDedicatedClusterControllerCluster(id);
}
}
@@ -111,10 +110,6 @@ public class ApplicationCuratorDatabase {
: data.map(bytes -> Long.parseLong(Utf8.toString(bytes)));
}
- public void setDedicatedClusterControllerCluster(ApplicationId id) {
- curator.create(dedicatedClusterControllerClusterPath(id));
- }
-
/**
* List the active applications of a tenant in this config server.
*
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/Session.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/Session.java
index 275d293e227..9b74eac5631 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/Session.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/Session.java
@@ -158,14 +158,6 @@ public abstract class Session implements Comparable<Session> {
return sessionZooKeeperClient.getAllocatedHosts();
}
- public void setDedicatedClusterControllerCluster() {
- sessionZooKeeperClient.writeDedicatedClusterControllerCluster();
- }
-
- public boolean getDedicatedClusterControllerCluster() {
- return sessionZooKeeperClient.readDedicatedClusterControllerCluster();
- }
-
public Transaction createDeactivateTransaction() {
return createSetStatusTransaction(Status.DEACTIVATE);
}
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionPreparer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionPreparer.java
index 62052e935f1..30cdc0f6e8a 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionPreparer.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionPreparer.java
@@ -118,7 +118,7 @@ public class SessionPreparer {
ApplicationId applicationId = params.getApplicationId();
Preparation preparation = new Preparation(hostValidator, logger, params, activeApplicationSet,
TenantRepository.getTenantPath(applicationId.tenant()),
- serverDbSessionDir, applicationPackage, sessionZooKeeperClient, true);
+ serverDbSessionDir, applicationPackage, sessionZooKeeperClient);
preparation.preprocess();
try {
AllocatedHosts allocatedHosts = preparation.buildModels(now);
@@ -172,7 +172,7 @@ public class SessionPreparer {
Preparation(HostValidator<ApplicationId> hostValidator, DeployLogger logger, PrepareParams params,
Optional<ApplicationSet> currentActiveApplicationSet, Path tenantPath,
File serverDbSessionDir, ApplicationPackage applicationPackage,
- SessionZooKeeperClient sessionZooKeeperClient, boolean dedicatedClusterControllerCluster) {
+ SessionZooKeeperClient sessionZooKeeperClient) {
this.logger = logger;
this.params = params;
this.applicationPackage = applicationPackage;
@@ -277,8 +277,7 @@ public class SessionPreparer {
prepareResult.allocatedHosts(),
athenzDomain,
params.quota(),
- params.tenantSecretStores(),
- properties.dedicatedClusterControllerCluster());
+ params.tenantSecretStores());
checkTimeout("write state to zookeeper");
}
@@ -328,8 +327,7 @@ public class SessionPreparer {
AllocatedHosts allocatedHosts,
Optional<AthenzDomain> athenzDomain,
Optional<Quota> quota,
- List<TenantSecretStore> tenantSecretStores,
- boolean dedicatedClusterControllerCluster) {
+ List<TenantSecretStore> tenantSecretStores) {
ZooKeeperDeployer zkDeployer = zooKeeperClient.createDeployer(deployLogger);
try {
zkDeployer.deploy(applicationPackage, fileRegistryMap, allocatedHosts);
@@ -341,8 +339,6 @@ public class SessionPreparer {
zooKeeperClient.writeAthenzDomain(athenzDomain);
zooKeeperClient.writeQuota(quota);
zooKeeperClient.writeTenantSecretStores(tenantSecretStores);
- if (dedicatedClusterControllerCluster)
- zooKeeperClient.writeDedicatedClusterControllerCluster();
} catch (RuntimeException | IOException e) {
zkDeployer.cleanup();
throw new RuntimeException("Error preparing session", e);
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java
index caa2de16c97..d2260683495 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java
@@ -255,8 +255,6 @@ public class SessionRepository {
session.setVespaVersion(existingSession.getVespaVersion());
session.setDockerImageRepository(existingSession.getDockerImageRepository());
session.setAthenzDomain(existingSession.getAthenzDomain());
- if (existingSession.getDedicatedClusterControllerCluster())
- session.setDedicatedClusterControllerCluster();
return session;
}
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClient.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClient.java
index 0757267ab0d..92d7f60d69b 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClient.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClient.java
@@ -57,9 +57,6 @@ public class SessionZooKeeperClient {
private static final String QUOTA_PATH = "quota";
private static final String TENANT_SECRET_STORES_PATH = "tenantSecretStores";
- // Whether the deployment of this particular session should use a dedicated CCC.
- // The one in ApplicationCuratorDatabase signals what all future preparations should use, i.e., here.
- private static final String DEDICATED_CLUSTER_CONTROLLER_CLUSTER_PATH = "dedicatedClusterControllerCluster";
private final Curator curator;
private final ConfigCurator configCurator;
private final TenantName tenantName;
@@ -201,10 +198,6 @@ public class SessionZooKeeperClient {
return sessionPath.append(TENANT_SECRET_STORES_PATH).getAbsolute();
}
- private String dedicatedClusterControllerClusterPath() {
- return sessionPath.append(DEDICATED_CLUSTER_CONTROLLER_CLUSTER_PATH).getAbsolute();
- }
-
public void writeVespaVersion(Version version) {
configCurator.putData(versionPath(), version.toString());
}
@@ -296,14 +289,6 @@ public class SessionZooKeeperClient {
.orElse(List.of());
}
- public void writeDedicatedClusterControllerCluster() {
- configCurator.createNode(dedicatedClusterControllerClusterPath());
- }
-
- public boolean readDedicatedClusterControllerCluster() {
- return configCurator.exists(dedicatedClusterControllerClusterPath());
- }
-
/**
* Create necessary paths atomically for a new session.
*