Skip to content

Commit 3bce113

Browse files
authored
Reduces terminationGracePeriodSeconds from 180s to 100s (#894)
The 180s termination grace period was to account for the very long time it could take for mlab-ns to notice that pod was shutting down. With Locate and Heartbeat, this process only takes 10s. Nothing changes about the configuration here, except removing unnecessary wait time. Tests still have 30s to complete, and pusher still has 60s to push data to GCS as fast as it can. Resolves m-lab/ops-tracker#1742
1 parent 9963d57 commit 3bce113

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

k8s/daemonsets/templates.jsonnet

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ local PROJECT_ID = std.extVar('PROJECT_ID');
1313
//
1414
// * k8s sends SIGTERM to container
1515
// * container enables lame duck status
16-
// * monitoring reads lame duck status (60s max)
17-
// * mlab-ns updates server status (60s max)
16+
// * heartbeat notices lame duck status and notifies Locate (10s max)
1817
// * all currently running tests complete. (30s max)
19-
// * give everything an additional 30s to be safe
20-
// * 60s + 60s + 30s + 30s = 180s grace period
21-
local terminationGracePeriodSeconds = 180;
18+
// * give Pusher an additional 60s to upload all data
19+
// * 10s + 30s + 60s = 100s grace period
20+
local terminationGracePeriodSeconds = 100;
2221

2322
local uuid = {
2423
initContainer: {
@@ -845,7 +844,7 @@ local Experiment(name, index, bucket, anonMode, datatypes=[], datatypesAutoloade
845844
dnsConfig: {
846845
nameservers: ['8.8.8.8', '8.8.4.4'],
847846
},
848-
// Only enable extended grace period where production traffic is possible.
847+
// Apply extended grace period, except for mlab-sandbox
849848
[if std.extVar('PROJECT_ID') != 'mlab-sandbox' then 'terminationGracePeriodSeconds']: terminationGracePeriodSeconds,
850849
},
851850
},

0 commit comments

Comments
 (0)