diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-03-12 10:41:33 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-03-12 10:41:33 +0100 |
commit | 9683cfa12bdde093382d136b9e67eeefe9c3e8d2 (patch) | |
tree | 2a89fc5a2235a3cdb324742e7568e1243c2b60e9 | |
parent | 3a8b891dcd7f394129a7a7ba700bf525126db44f (diff) |
Wait for data migration also in dev and perf
2 files changed, 17 insertions, 25 deletions
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 7b0606b809b..65d34eb8e83 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 @@ -146,42 +146,34 @@ public class NodeRepositoryMaintenance extends AbstractComponent { private final NodeFailer.ThrottlePolicy throttlePolicy; DefaultTimes(Environment environment) { + failGrace = Duration.ofMinutes(60); + periodicRedeployInterval = Duration.ofMinutes(30); + operatorChangeRedeployInterval = Duration.ofMinutes(1); + failedExpirerInterval = Duration.ofMinutes(10); + provisionedExpiry = Duration.ofHours(4); + rebootInterval = Duration.ofDays(30); + nodeRetirerInterval = Duration.ofMinutes(30); + metricsInterval = Duration.ofMinutes(1); + throttlePolicy = NodeFailer.ThrottlePolicy.hosted; + + if (environment.isTest()) + retiredExpiry = Duration.ofMinutes(1); // fast turnaround as test envs don't have persistent data + else + retiredExpiry = Duration.ofDays(4); // give up migrating data after 4 days + + if (environment.equals(Environment.prod)) { - // These values are to avoid losing data (retired), and to be able to return an application - // back to a previous state fast (inactive) - failGrace = Duration.ofMinutes(60); - periodicRedeployInterval = Duration.ofMinutes(30); - operatorChangeRedeployInterval = Duration.ofMinutes(1); zooKeeperAccessMaintenanceInterval = Duration.ofMinutes(1); reservationExpiry = Duration.ofMinutes(20); // same as deployment timeout inactiveExpiry = Duration.ofHours(4); // enough time for the application owner to discover and redeploy - retiredExpiry = Duration.ofDays(4); // enough time to migrate data retiredInterval = Duration.ofMinutes(29); - failedExpirerInterval = Duration.ofMinutes(10); dirtyExpiry = Duration.ofHours(2); // enough time to clean the node - provisionedExpiry = Duration.ofHours(4); - rebootInterval = Duration.ofDays(30); - nodeRetirerInterval = Duration.ofMinutes(30); - metricsInterval = Duration.ofMinutes(1); - throttlePolicy = NodeFailer.ThrottlePolicy.hosted; } else { - // These values ensure tests and development is not delayed due to nodes staying around - // Use non-null values as these also determine the maintenance interval - failGrace = Duration.ofMinutes(60); - periodicRedeployInterval = Duration.ofMinutes(30); - operatorChangeRedeployInterval = Duration.ofMinutes(1); zooKeeperAccessMaintenanceInterval = Duration.ofSeconds(10); reservationExpiry = Duration.ofMinutes(10); // Need to be long enough for deployment to be finished for all config model versions inactiveExpiry = Duration.ofSeconds(2); // support interactive wipe start over - retiredExpiry = Duration.ofMinutes(1); retiredInterval = Duration.ofMinutes(5); - failedExpirerInterval = Duration.ofMinutes(10); dirtyExpiry = Duration.ofMinutes(30); - provisionedExpiry = Duration.ofHours(4); - rebootInterval = Duration.ofDays(30); - nodeRetirerInterval = Duration.ofMinutes(30); - metricsInterval = Duration.ofMinutes(1); - throttlePolicy = NodeFailer.ThrottlePolicy.hosted; } } diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/RetiredExpirer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/RetiredExpirer.java index 6a2ca90df09..b06b5934713 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/RetiredExpirer.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/RetiredExpirer.java @@ -23,7 +23,7 @@ import java.util.stream.Collectors; /** * Maintenance job which deactivates retired nodes, if given permission by orchestrator, or - * after giving the system has been given sufficient time to migrate data to other nodes. + * after the system has been given sufficient time to migrate data to other nodes. * * @author hakon */ |