aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValerij Fredriksen <freva@users.noreply.github.com>2020-10-06 15:11:10 +0200
committerGitHub <noreply@github.com>2020-10-06 15:11:10 +0200
commitc75fc27d408d8d70ea0cfe9938edc81359853dd8 (patch)
treeca6391ec789da0137eb3169923c9828febb3bae8
parent32583c92499e91586a39f5744cc65b72bdea0702 (diff)
parent3da9e5f2feace501c61458433469ba8a742287e1 (diff)
Merge pull request #14734 from vespa-engine/hmusum/remove-unused-feature-flag-2
Remove flag configserver-distribute-application-package
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java5
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionPreparer.java8
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java13
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionStateWatcher.java5
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/version/VersionState.java25
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java15
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/ConfigServerBootstrapTest.java2
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java4
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/version/VersionStateTest.java23
-rw-r--r--flags/src/main/java/com/yahoo/vespa/flags/Flags.java5
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRepositoryMaintenance.java15
11 files changed, 28 insertions, 92 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java
index e41d5264c08..43211d02a79 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java
@@ -11,9 +11,7 @@ import com.yahoo.vespa.config.server.tenant.Tenant;
import com.yahoo.vespa.curator.Curator;
import com.yahoo.vespa.defaults.Defaults;
import com.yahoo.vespa.filedistribution.FileDownloader;
-import com.yahoo.vespa.flags.BooleanFlag;
import com.yahoo.vespa.flags.FlagSource;
-import com.yahoo.vespa.flags.Flags;
import java.io.File;
import java.time.Duration;
@@ -35,7 +33,6 @@ public class ApplicationPackageMaintainer extends ConfigServerMaintainer {
private final ApplicationRepository applicationRepository;
private final ConnectionPool connectionPool;
private final File downloadDirectory;
- private final BooleanFlag distributeApplicationPackage;
ApplicationPackageMaintainer(ApplicationRepository applicationRepository,
Curator curator,
@@ -46,14 +43,12 @@ public class ApplicationPackageMaintainer extends ConfigServerMaintainer {
ConfigserverConfig configserverConfig = applicationRepository.configserverConfig();
connectionPool = createConnectionPool(configserverConfig);
- distributeApplicationPackage = Flags.CONFIGSERVER_DISTRIBUTE_APPLICATION_PACKAGE.bindTo(flagSource);
downloadDirectory = new File(Defaults.getDefaults().underVespaHome(configserverConfig.fileReferencesDir()));
}
@Override
protected boolean maintain() {
boolean success = true;
- if (! distributeApplicationPackage.value()) return success;
try (var fileDownloader = new FileDownloader(connectionPool, downloadDirectory)) {
for (var applicationId : applicationRepository.listApplications()) {
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 6aed054486e..2e7f2244424 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
@@ -48,9 +48,7 @@ import com.yahoo.vespa.config.server.tenant.EndpointCertificateMetadataSerialize
import com.yahoo.vespa.config.server.tenant.EndpointCertificateMetadataStore;
import com.yahoo.vespa.config.server.tenant.EndpointCertificateRetriever;
import com.yahoo.vespa.curator.Curator;
-import com.yahoo.vespa.flags.BooleanFlag;
import com.yahoo.vespa.flags.FlagSource;
-import com.yahoo.vespa.flags.Flags;
import org.xml.sax.SAXException;
import javax.xml.parsers.ParserConfigurationException;
@@ -86,7 +84,6 @@ public class SessionPreparer {
private final Curator curator;
private final Zone zone;
private final SecretStore secretStore;
- private final BooleanFlag distributeApplicationPackage;
private final FlagSource flagSource;
@Inject
@@ -109,7 +106,6 @@ public class SessionPreparer {
this.curator = curator;
this.zone = zone;
this.secretStore = secretStore;
- this.distributeApplicationPackage = Flags.CONFIGSERVER_DISTRIBUTE_APPLICATION_PACKAGE.bindTo(flagSource);
this.flagSource = flagSource;
}
@@ -245,8 +241,6 @@ public class SessionPreparer {
}
Optional<FileReference> distributeApplicationPackage() {
- if ( ! distributeApplicationPackage.value()) return Optional.empty();
-
FileRegistry fileRegistry = fileDistributionProvider.getFileRegistry();
FileReference fileReference = fileRegistry.addApplicationPackage();
FileDistribution fileDistribution = fileDistributionProvider.getFileDistribution();
@@ -349,7 +343,7 @@ public class SessionPreparer {
zkDeployer.deploy(applicationPackage, fileRegistryMap, allocatedHosts);
// Note: When changing the below you need to also change similar calls in SessionRepository.createSessionFromExisting()
zooKeeperClient.writeApplicationId(applicationId);
- if (distributeApplicationPackage.value()) zooKeeperClient.writeApplicationPackageReference(distributedApplicationPackage);
+ zooKeeperClient.writeApplicationPackageReference(distributedApplicationPackage);
zooKeeperClient.writeVespaVersion(vespaVersion);
zooKeeperClient.writeDockerImageRepository(dockerImageRepository);
zooKeeperClient.writeAthenzDomain(athenzDomain);
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 bbca0bca5b8..518294a13b8 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
@@ -32,9 +32,7 @@ import com.yahoo.vespa.config.server.zookeeper.ConfigCurator;
import com.yahoo.vespa.config.server.zookeeper.SessionCounter;
import com.yahoo.vespa.curator.Curator;
import com.yahoo.vespa.defaults.Defaults;
-import com.yahoo.vespa.flags.BooleanFlag;
import com.yahoo.vespa.flags.FlagSource;
-import com.yahoo.vespa.flags.Flags;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.recipes.cache.ChildData;
import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent;
@@ -84,7 +82,6 @@ public class SessionRepository {
private final Curator curator;
private final Executor zkWatcherExecutor;
private final TenantFileSystemDirs tenantFileSystemDirs;
- private final BooleanFlag distributeApplicationPackage;
private final MetricUpdater metrics;
private final Curator.DirectoryCache directoryCache;
private final TenantApplications applicationRepo;
@@ -109,7 +106,6 @@ public class SessionRepository {
this.tenantFileSystemDirs = new TenantFileSystemDirs(componentRegistry.getConfigServerDB(), tenantName);
this.applicationRepo = applicationRepo;
this.sessionPreparer = sessionPreparer;
- this.distributeApplicationPackage = Flags.CONFIGSERVER_DISTRIBUTE_APPLICATION_PACKAGE.bindTo(flagSource);
this.metrics = componentRegistry.getMetrics().getOrCreateMetricUpdater(Metrics.createDimensions(tenantName));
this.locksPath = TenantRepository.getLocksPath(tenantName);
loadSessions(); // Needs to be done before creating cache below
@@ -352,8 +348,7 @@ public class SessionRepository {
log.log(Level.FINE, () -> session.logPre() + "Confirming upload for session " + sessionId);
confirmUpload(session);
}
- if (distributeApplicationPackage())
- createLocalSessionUsingDistributedApplicationPackage(sessionId);
+ createLocalSessionUsingDistributedApplicationPackage(sessionId);
}
void activate(RemoteSession session) {
@@ -383,10 +378,6 @@ public class SessionRepository {
}
}
- boolean distributeApplicationPackage() {
- return distributeApplicationPackage.value();
- }
-
private void sessionRemoved(long sessionId) {
SessionStateWatcher watcher = sessionStateWatchers.remove(sessionId);
if (watcher != null) watcher.close();
@@ -590,7 +581,7 @@ public class SessionRepository {
LocalSession session = create(existingApp, existingApplicationId, activeSessionId, internalRedeploy, timeoutBudget);
// Note: Needs to be kept in sync with calls in SessionPreparer.writeStateToZooKeeper()
session.setApplicationId(existingApplicationId);
- if (distributeApplicationPackage() && existingSession.getApplicationPackageReference() != null) {
+ if (existingSession.getApplicationPackageReference() != null) {
session.setApplicationPackageReference(existingSession.getApplicationPackageReference());
}
session.setVespaVersion(existingSession.getVespaVersion());
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionStateWatcher.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionStateWatcher.java
index a5ac0369f1b..b23d55b498f 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionStateWatcher.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionStateWatcher.java
@@ -7,7 +7,6 @@ import com.yahoo.vespa.curator.Curator;
import org.apache.curator.framework.recipes.cache.ChildData;
import java.util.concurrent.Executor;
-import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -70,9 +69,7 @@ public class SessionStateWatcher {
}
private void createLocalSession(long sessionId) {
- if (sessionRepository.distributeApplicationPackage()) {
- sessionRepository.createLocalSessionUsingDistributedApplicationPackage(sessionId);
- }
+ sessionRepository.createLocalSessionUsingDistributedApplicationPackage(sessionId);
}
public long getSessionId() {
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/version/VersionState.java b/configserver/src/main/java/com/yahoo/vespa/config/server/version/VersionState.java
index b0bc8dc90dd..6bc175338f3 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/version/VersionState.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/version/VersionState.java
@@ -9,9 +9,6 @@ import com.yahoo.path.Path;
import com.yahoo.text.Utf8;
import com.yahoo.vespa.curator.Curator;
import com.yahoo.vespa.defaults.Defaults;
-import com.yahoo.vespa.flags.BooleanFlag;
-import com.yahoo.vespa.flags.FlagSource;
-import com.yahoo.vespa.flags.Flags;
import java.io.File;
import java.io.FileReader;
@@ -32,17 +29,15 @@ public class VersionState {
private final File versionFile;
private final Curator curator;
- private final BooleanFlag distributeApplicationPackage;
@Inject
- public VersionState(ConfigserverConfig config, Curator curator, FlagSource flagsource) {
- this(new File(Defaults.getDefaults().underVespaHome(config.configServerDBDir()), "vespa_version"), curator, flagsource);
+ public VersionState(ConfigserverConfig config, Curator curator) {
+ this(new File(Defaults.getDefaults().underVespaHome(config.configServerDBDir()), "vespa_version"), curator);
}
- public VersionState(File versionFile, Curator curator, FlagSource flagSource) {
+ public VersionState(File versionFile, Curator curator) {
this.versionFile = versionFile;
this.curator = curator;
- this.distributeApplicationPackage = Flags.CONFIGSERVER_DISTRIBUTE_APPLICATION_PACKAGE.bindTo(flagSource);
}
public boolean isUpgraded() {
@@ -63,14 +58,12 @@ public class VersionState {
}
public Version storedVersion() {
- if (distributeApplicationPackage.value()) {
- Optional<byte[]> version = curator.getData(versionPath);
- if(version.isPresent()) {
- try {
- return Version.fromString(Utf8.toString(version.get()));
- } catch (Exception e) {
- // continue, use value in file
- }
+ Optional<byte[]> version = curator.getData(versionPath);
+ if (version.isPresent()) {
+ try {
+ return Version.fromString(Utf8.toString(version.get()));
+ } catch (Exception e) {
+ // continue, use value in file
}
}
try (FileReader reader = new FileReader(versionFile)) {
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java
index 7dc19491654..823172e071e 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java
@@ -48,8 +48,6 @@ import com.yahoo.vespa.config.server.zookeeper.ConfigCurator;
import com.yahoo.vespa.config.util.ConfigUtils;
import com.yahoo.vespa.curator.Curator;
import com.yahoo.vespa.curator.mock.MockCurator;
-import com.yahoo.vespa.flags.FlagSource;
-import com.yahoo.vespa.flags.Flags;
import com.yahoo.vespa.flags.InMemoryFlagSource;
import com.yahoo.vespa.model.VespaModelFactory;
import org.hamcrest.core.Is;
@@ -116,10 +114,6 @@ public class ApplicationRepositoryTest {
@Before
public void setup() throws IOException {
- setup(new InMemoryFlagSource());
- }
-
- public void setup(FlagSource flagSource) throws IOException {
curator = new MockCurator();
configCurator = ConfigCurator.create(curator);
ConfigserverConfig configserverConfig = new ConfigserverConfig.Builder()
@@ -128,6 +122,7 @@ public class ApplicationRepositoryTest {
.configDefinitionsDir(temporaryFolder.newFolder().getAbsolutePath())
.fileReferencesDir(temporaryFolder.newFolder().getAbsolutePath())
.build();
+ InMemoryFlagSource flagSource = new InMemoryFlagSource();
TestComponentRegistry componentRegistry = new TestComponentRegistry.Builder()
.curator(curator)
.configServerConfig(configserverConfig)
@@ -674,14 +669,6 @@ public class ApplicationRepositoryTest {
resolve(SimpletypesConfig.class, requestHandler, applicationId(), vespaVersion);
}
- @Test
- public void testDistributionOfApplicationPackage() throws IOException {
- FlagSource flagSource = new InMemoryFlagSource()
- .withBooleanFlag(Flags.CONFIGSERVER_DISTRIBUTE_APPLICATION_PACKAGE.id(), true);
- setup(flagSource);
- applicationRepository.deploy(app1, prepareParams());
- }
-
private PrepareResult prepareAndActivate(File application) {
return applicationRepository.deploy(application, prepareParams());
}
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/ConfigServerBootstrapTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/ConfigServerBootstrapTest.java
index 73f38188ec9..aba3115ee84 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/ConfigServerBootstrapTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/ConfigServerBootstrapTest.java
@@ -245,7 +245,7 @@ public class ConfigServerBootstrapTest {
}
private VersionState createVersionState() throws IOException {
- return new VersionState(temporaryFolder.newFile(), curator, new InMemoryFlagSource());
+ return new VersionState(temporaryFolder.newFile(), curator);
}
public static class MockRpcServer extends com.yahoo.vespa.config.server.rpc.MockRpcServer {
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java
index 95cdccf4cb8..3858388ed39 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java
@@ -46,7 +46,6 @@ import com.yahoo.vespa.config.server.tenant.TenantRepository;
import com.yahoo.vespa.config.server.zookeeper.ConfigCurator;
import com.yahoo.vespa.config.util.ConfigUtils;
import com.yahoo.vespa.curator.mock.MockCurator;
-import com.yahoo.vespa.flags.Flags;
import com.yahoo.vespa.flags.InMemoryFlagSource;
import org.junit.Before;
import org.junit.Rule;
@@ -70,8 +69,8 @@ import java.util.Optional;
import java.util.Set;
import java.util.logging.Level;
-import static com.yahoo.vespa.config.server.session.SessionZooKeeperClient.APPLICATION_PACKAGE_REFERENCE_PATH;
import static com.yahoo.vespa.config.server.session.SessionPreparer.PrepareResult;
+import static com.yahoo.vespa.config.server.session.SessionZooKeeperClient.APPLICATION_PACKAGE_REFERENCE_PATH;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -243,7 +242,6 @@ public class SessionPreparerTest {
@Test
public void require_that_file_reference_of_application_package_is_written_to_zk() throws Exception {
- flagSource.withBooleanFlag(Flags.CONFIGSERVER_DISTRIBUTE_APPLICATION_PACKAGE.id(), true);
prepare(testApp);
assertTrue(configCurator.exists(sessionPath(1).append(APPLICATION_PACKAGE_REFERENCE_PATH).getAbsolute()));
}
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/version/VersionStateTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/version/VersionStateTest.java
index 1340935108b..86dbead50cf 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/version/VersionStateTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/version/VersionStateTest.java
@@ -5,8 +5,6 @@ import com.yahoo.cloud.config.ConfigserverConfig;
import com.yahoo.component.Version;
import com.yahoo.io.IOUtils;
import com.yahoo.vespa.curator.mock.MockCurator;
-import com.yahoo.vespa.flags.Flags;
-import com.yahoo.vespa.flags.InMemoryFlagSource;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -24,7 +22,6 @@ import static org.junit.Assert.assertTrue;
* @author Ulf Lilleengen
*/
public class VersionStateTest {
- InMemoryFlagSource flagSource = new InMemoryFlagSource();
@Rule
public TemporaryFolder tempDir = new TemporaryFolder();
@@ -32,12 +29,6 @@ public class VersionStateTest {
@Test
public void upgrade() throws IOException {
- upgrade(true);
- upgrade(false);
- }
-
- public void upgrade(boolean distributeApplicationPackage) throws IOException {
- flagSource.withBooleanFlag(Flags.CONFIGSERVER_DISTRIBUTE_APPLICATION_PACKAGE.id(), distributeApplicationPackage);
Version unknownVersion = new Version(0, 0, 0);
VersionState state = createVersionState();
@@ -61,11 +52,9 @@ public class VersionStateTest {
// Save new version, remove version in file, should find version in ZooKeeper
state.saveNewVersion("6.0.0");
- if (distributeApplicationPackage) {
- Files.delete(state.versionFile().toPath());
- assertThat(state.storedVersion(), is(new Version(6, 0, 0)));
- assertTrue(state.isUpgraded());
- }
+ Files.delete(state.versionFile().toPath());
+ assertThat(state.storedVersion(), is(new Version(6, 0, 0)));
+ assertTrue(state.isUpgraded());
state.saveNewVersion();
assertThat(state.currentVersion(), is(state.storedVersion()));
@@ -75,9 +64,7 @@ public class VersionStateTest {
@Test
public void serverdbfile() throws IOException {
File dbDir = tempDir.newFolder();
- VersionState state = new VersionState(new ConfigserverConfig.Builder().configServerDBDir(dbDir.getAbsolutePath()).build(),
- curator,
- new InMemoryFlagSource());
+ VersionState state = new VersionState(new ConfigserverConfig.Builder().configServerDBDir(dbDir.getAbsolutePath()).build(), curator);
state.saveNewVersion();
File versionFile = new File(dbDir, "vespa_version");
assertTrue(versionFile.exists());
@@ -86,7 +73,7 @@ public class VersionStateTest {
}
private VersionState createVersionState() throws IOException {
- return new VersionState(tempDir.newFile(), curator, flagSource);
+ return new VersionState(tempDir.newFile(), curator);
}
}
diff --git a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
index 508033e3c94..0b482709954 100644
--- a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
+++ b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
@@ -292,11 +292,6 @@ public class Flags {
"Takes effect immediately",
ZONE_ID);
- public static final UnboundBooleanFlag CONFIGSERVER_DISTRIBUTE_APPLICATION_PACKAGE = defineFeatureFlag(
- "configserver-distribute-application-package", true,
- "Whether the application package should be distributed to other config servers during a deployment",
- "Takes effect immediately");
-
public static final UnboundBooleanFlag PROVISION_APPLICATION_ROLES = defineFeatureFlag(
"provision-application-roles", false,
"Whether application roles should be provisioned",
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRepositoryMaintenance.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRepositoryMaintenance.java
index 95143a07576..f291f688aa9 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRepositoryMaintenance.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRepositoryMaintenance.java
@@ -10,7 +10,6 @@ import com.yahoo.config.provision.InfraDeployer;
import com.yahoo.config.provision.Zone;
import com.yahoo.jdisc.Metric;
import com.yahoo.vespa.flags.FlagSource;
-import com.yahoo.vespa.flags.Flags;
import com.yahoo.vespa.hosted.provision.NodeRepository;
import com.yahoo.vespa.hosted.provision.autoscale.NodeMetrics;
import com.yahoo.vespa.hosted.provision.autoscale.NodeMetricsDb;
@@ -66,7 +65,7 @@ public class NodeRepositoryMaintenance extends AbstractComponent {
Zone zone, Clock clock, Orchestrator orchestrator, Metric metric,
ProvisionServiceProvider provisionServiceProvider, FlagSource flagSource,
NodeMetrics nodeMetrics, NodeMetricsDb nodeMetricsDb) {
- DefaultTimes defaults = new DefaultTimes(zone, Flags.CONFIGSERVER_DISTRIBUTE_APPLICATION_PACKAGE.bindTo(flagSource).value());
+ DefaultTimes defaults = new DefaultTimes(zone);
nodeFailer = new NodeFailer(deployer, hostLivenessTracker, serviceMonitor, nodeRepository, defaults.failGrace,
defaults.nodeFailerInterval, clock, orchestrator, defaults.throttlePolicy, metric);
@@ -155,21 +154,21 @@ public class NodeRepositoryMaintenance extends AbstractComponent {
private final NodeFailer.ThrottlePolicy throttlePolicy;
- DefaultTimes(Zone zone, boolean deploymentExistsOnAllConfigServers) {
- autoscalingInterval = deploymentExistsOnAllConfigServers ? Duration.ofMinutes(15) : Duration.ofMinutes(5);
+ DefaultTimes(Zone zone) {
+ autoscalingInterval = Duration.ofMinutes(15);
dynamicProvisionerInterval = Duration.ofMinutes(5);
failedExpirerInterval = Duration.ofMinutes(10);
failGrace = Duration.ofMinutes(30);
infrastructureProvisionInterval = Duration.ofMinutes(1);
loadBalancerExpirerInterval = Duration.ofMinutes(5);
metricsInterval = Duration.ofMinutes(1);
- nodeFailerInterval = deploymentExistsOnAllConfigServers ? Duration.ofMinutes(15) : Duration.ofMinutes(5);
+ nodeFailerInterval = Duration.ofMinutes(15);
nodeMetricsCollectionInterval = Duration.ofMinutes(1);
- operatorChangeRedeployInterval = deploymentExistsOnAllConfigServers ? Duration.ofMinutes(3) : Duration.ofMinutes(1);
+ operatorChangeRedeployInterval = Duration.ofMinutes(3);
osUpgradeActivatorInterval = zone.system().isCd() ? Duration.ofSeconds(30) : Duration.ofMinutes(5);
periodicRedeployInterval = Duration.ofMinutes(30);
provisionedExpiry = Duration.ofHours(4);
- rebalancerInterval = deploymentExistsOnAllConfigServers ? Duration.ofMinutes(120) : Duration.ofMinutes(40);
+ rebalancerInterval = Duration.ofMinutes(120);
redeployMaintainerInterval = Duration.ofMinutes(1);
// Need to be long enough for deployment to be finished for all config model versions
// Should be equal to timeout for deployments
@@ -180,7 +179,7 @@ public class NodeRepositoryMaintenance extends AbstractComponent {
if (zone.environment().equals(Environment.prod) && ! zone.system().isCd()) {
inactiveExpiry = Duration.ofHours(4); // enough time for the application owner to discover and redeploy
- retiredInterval = deploymentExistsOnAllConfigServers ? Duration.ofMinutes(30) : Duration.ofMinutes(10);
+ retiredInterval = Duration.ofMinutes(30);
dirtyExpiry = Duration.ofHours(2); // enough time to clean the node
retiredExpiry = Duration.ofDays(4); // give up migrating data after 4 days
} else {