aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Omar Johansen <johansen@yahoo-inc.com>2022-08-11 15:28:32 +0200
committerGitHub <noreply@github.com>2022-08-11 15:28:32 +0200
commit482ba60da0512eba63ecb766915d333052cb351d (patch)
tree68feeb4cbd113af43f843b89d30c863e56e86c46
parent4ccde972c38a60aa952bbc30a3a004ce57d0e69b (diff)
parentec0a9040e58de72e61a28782ab3f925154b5d015 (diff)
Merge pull request #23633 from vespa-engine/ogronnesby/expire-idle-tenants-after-6-months
Expire idle tenants after 6 months
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/CloudTrialExpirer.java2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/CloudTrialExpirerTest.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/CloudTrialExpirer.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/CloudTrialExpirer.java
index 9baa1ad37a1..18ef47759f4 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/CloudTrialExpirer.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/CloudTrialExpirer.java
@@ -28,7 +28,7 @@ public class CloudTrialExpirer extends ControllerMaintainer {
private static final Logger log = Logger.getLogger(CloudTrialExpirer.class.getName());
private static final Duration nonePlanAfter = Duration.ofDays(14);
- private static final Duration tombstoneAfter = Duration.ofDays(365);
+ private static final Duration tombstoneAfter = Duration.ofDays(183);
private final ListFlag<String> extendedTrialTenants;
public CloudTrialExpirer(Controller controller, Duration interval) {
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/CloudTrialExpirerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/CloudTrialExpirerTest.java
index 8022067b29f..c5c70998624 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/CloudTrialExpirerTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/CloudTrialExpirerTest.java
@@ -37,7 +37,7 @@ public class CloudTrialExpirerTest {
@Test
void tombstone_inactive_none() {
- registerTenant("none-tenant", "none", Duration.ofDays(365).plusMillis(1));
+ registerTenant("none-tenant", "none", Duration.ofDays(183).plusMillis(1));
assertEquals(1.0, expirer.maintain());
assertEquals(Tenant.Type.deleted, tester.controller().tenants().get(TenantName.from("none-tenant"), true).get().type());
}
@@ -74,7 +74,7 @@ public class CloudTrialExpirerTest {
@Test
void delete_tenants_with_applications_with_no_deployments() {
- registerTenant("with-apps", "trial", Duration.ofDays(366));
+ registerTenant("with-apps", "trial", Duration.ofDays(184));
tester.createApplication("with-apps", "app1", "instance1");
assertEquals(1.0, expirer.maintain());
assertPlan("with-apps", "none");
@@ -84,7 +84,7 @@ public class CloudTrialExpirerTest {
@Test
void keep_tenants_without_applications_that_are_idle() {
- registerTenant("active", "none", Duration.ofDays(364));
+ registerTenant("active", "none", Duration.ofDays(182));
assertEquals(1.0, expirer.maintain());
assertPlan("active", "none");
}