Skip to content

Commit 22b1da6

Browse files
authored
K8SPSMDB-548: Add mongo client timeouts (percona#766)
* K8SPSMDB-548: Add mongo client timeouts for healthcheck * fix tests * increase client timeouts inside operator * fix monitoring-2-0
1 parent 3f45c7b commit 22b1da6

File tree

101 files changed

+113
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+113
-105
lines changed

Diff for: cmd/mongodb-healthcheck/main.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func main() {
116116
case "mongod":
117117
memberState, err := healthcheck.HealthCheckMongodLiveness(client, int64(*startupDelaySeconds))
118118
if err != nil {
119-
client.Disconnect(context.TODO())
119+
client.Disconnect(context.TODO()) // nolint:golint,errcheck
120120
log.Errorf("Member failed Kubernetes liveness check: %s", err.Error())
121121
os.Exit(1)
122122
}
@@ -125,7 +125,7 @@ func main() {
125125
case "mongos":
126126
err := healthcheck.HealthCheckMongosLiveness(client)
127127
if err != nil {
128-
client.Disconnect(context.TODO())
128+
client.Disconnect(context.TODO()) // nolint:golint,errcheck
129129
log.Errorf("Member failed Kubernetes liveness check: %s", err.Error())
130130
os.Exit(1)
131131
}
@@ -137,14 +137,14 @@ func main() {
137137
switch *component {
138138

139139
case "mongod":
140-
client.Disconnect(context.TODO())
140+
client.Disconnect(context.TODO()) // nolint:golint,errcheck
141141
log.Error("readiness check for mongod is not implemented")
142142
os.Exit(1)
143143

144144
case "mongos":
145145
err := healthcheck.MongosReadinessCheck(client)
146146
if err != nil {
147-
client.Disconnect(context.TODO())
147+
client.Disconnect(context.TODO()) // nolint:golint,errcheck
148148
log.Errorf("Member failed Kubernetes readiness check: %s", err.Error())
149149
os.Exit(1)
150150
}

Diff for: e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
initialDelaySeconds: 60
100100
periodSeconds: 30
101101
successThreshold: 1
102-
timeoutSeconds: 5
102+
timeoutSeconds: 10
103103
name: mongod-arbiter
104104
ports:
105105
- containerPort: 27017

Diff for: e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ spec:
9393
initialDelaySeconds: 60
9494
periodSeconds: 30
9595
successThreshold: 1
96-
timeoutSeconds: 5
96+
timeoutSeconds: 10
9797
name: mongod-arbiter
9898
ports:
9999
- containerPort: 27017

Diff for: e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ spec:
100100
initialDelaySeconds: 60
101101
periodSeconds: 30
102102
successThreshold: 1
103-
timeoutSeconds: 5
103+
timeoutSeconds: 10
104104
name: mongod-arbiter
105105
ports:
106106
- containerPort: 27017

Diff for: e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ spec:
100100
initialDelaySeconds: 60
101101
periodSeconds: 30
102102
successThreshold: 1
103-
timeoutSeconds: 5
103+
timeoutSeconds: 10
104104
name: mongod-arbiter
105105
ports:
106106
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/deployment_some-name-mongos-4-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ spec:
8989
initialDelaySeconds: 60
9090
periodSeconds: 30
9191
successThreshold: 1
92-
timeoutSeconds: 5
92+
timeoutSeconds: 10
9393
name: mongos
9494
ports:
9595
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/deployment_some-name-mongos-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ spec:
8989
initialDelaySeconds: 60
9090
periodSeconds: 30
9191
successThreshold: 1
92-
timeoutSeconds: 5
92+
timeoutSeconds: 10
9393
name: mongos
9494
ports:
9595
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/deployment_some-name-mongos-secret.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ spec:
8989
initialDelaySeconds: 60
9090
periodSeconds: 30
9191
successThreshold: 1
92-
timeoutSeconds: 5
92+
timeoutSeconds: 10
9393
name: mongos
9494
ports:
9595
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/deployment_some-name-mongos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ spec:
8989
initialDelaySeconds: 60
9090
periodSeconds: 30
9191
successThreshold: 1
92-
timeoutSeconds: 5
92+
timeoutSeconds: 10
9393
name: mongos
9494
ports:
9595
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-4-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ spec:
110110
initialDelaySeconds: 60
111111
periodSeconds: 30
112112
successThreshold: 1
113-
timeoutSeconds: 5
113+
timeoutSeconds: 10
114114
name: mongod
115115
ports:
116116
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ spec:
110110
initialDelaySeconds: 60
111111
periodSeconds: 30
112112
successThreshold: 1
113-
timeoutSeconds: 5
113+
timeoutSeconds: 10
114114
name: mongod
115115
ports:
116116
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ spec:
110110
initialDelaySeconds: 60
111111
periodSeconds: 30
112112
successThreshold: 1
113-
timeoutSeconds: 5
113+
timeoutSeconds: 10
114114
name: mongod
115115
ports:
116116
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-4-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
initialDelaySeconds: 60
100100
periodSeconds: 30
101101
successThreshold: 1
102-
timeoutSeconds: 5
102+
timeoutSeconds: 10
103103
name: mongod
104104
ports:
105105
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
initialDelaySeconds: 60
100100
periodSeconds: 30
101101
successThreshold: 1
102-
timeoutSeconds: 5
102+
timeoutSeconds: 10
103103
name: mongod
104104
ports:
105105
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
initialDelaySeconds: 60
100100
periodSeconds: 30
101101
successThreshold: 1
102-
timeoutSeconds: 5
102+
timeoutSeconds: 10
103103
name: mongod
104104
ports:
105105
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
initialDelaySeconds: 60
100100
periodSeconds: 30
101101
successThreshold: 1
102-
timeoutSeconds: 5
102+
timeoutSeconds: 10
103103
name: mongod
104104
ports:
105105
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
initialDelaySeconds: 60
100100
periodSeconds: 30
101101
successThreshold: 1
102-
timeoutSeconds: 5
102+
timeoutSeconds: 10
103103
name: mongod
104104
ports:
105105
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
initialDelaySeconds: 60
100100
periodSeconds: 30
101101
successThreshold: 1
102-
timeoutSeconds: 5
102+
timeoutSeconds: 10
103103
name: mongod
104104
ports:
105105
- containerPort: 27017

Diff for: e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
initialDelaySeconds: 60
100100
periodSeconds: 30
101101
successThreshold: 1
102-
timeoutSeconds: 5
102+
timeoutSeconds: 10
103103
name: mongod
104104
ports:
105105
- containerPort: 27017

Diff for: e2e-tests/demand-backup/compare/statefulset_some-name-rs0-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ spec:
9898
initialDelaySeconds: 60
9999
periodSeconds: 30
100100
successThreshold: 1
101-
timeoutSeconds: 5
101+
timeoutSeconds: 10
102102
name: mongod
103103
ports:
104104
- containerPort: 27017

Diff for: e2e-tests/demand-backup/compare/statefulset_some-name-rs0.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ spec:
9898
initialDelaySeconds: 60
9999
periodSeconds: 30
100100
successThreshold: 1
101-
timeoutSeconds: 5
101+
timeoutSeconds: 10
102102
name: mongod
103103
ports:
104104
- containerPort: 27017

Diff for: e2e-tests/init-deploy/compare/statefulset_another-name-rs0-4-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ spec:
9898
initialDelaySeconds: 60
9999
periodSeconds: 30
100100
successThreshold: 1
101-
timeoutSeconds: 5
101+
timeoutSeconds: 10
102102
name: mongod
103103
ports:
104104
- containerPort: 27017

Diff for: e2e-tests/init-deploy/compare/statefulset_another-name-rs0-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ spec:
9898
initialDelaySeconds: 60
9999
periodSeconds: 30
100100
successThreshold: 1
101-
timeoutSeconds: 5
101+
timeoutSeconds: 10
102102
name: mongod
103103
ports:
104104
- containerPort: 27017

Diff for: e2e-tests/init-deploy/compare/statefulset_another-name-rs0.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ spec:
9898
initialDelaySeconds: 60
9999
periodSeconds: 30
100100
successThreshold: 1
101-
timeoutSeconds: 5
101+
timeoutSeconds: 10
102102
name: mongod
103103
ports:
104104
- containerPort: 27017

Diff for: e2e-tests/init-deploy/compare/statefulset_some-name-rs0-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ spec:
9898
initialDelaySeconds: 60
9999
periodSeconds: 30
100100
successThreshold: 1
101-
timeoutSeconds: 5
101+
timeoutSeconds: 10
102102
name: mongod
103103
ports:
104104
- containerPort: 27017

Diff for: e2e-tests/init-deploy/compare/statefulset_some-name-rs0.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ spec:
9898
initialDelaySeconds: 60
9999
periodSeconds: 30
100100
successThreshold: 1
101-
timeoutSeconds: 5
101+
timeoutSeconds: 10
102102
name: mongod
103103
ports:
104104
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-limits-rs0-increased-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
initialDelaySeconds: 60
110110
periodSeconds: 30
111111
successThreshold: 1
112-
timeoutSeconds: 5
112+
timeoutSeconds: 10
113113
name: mongod
114114
ports:
115115
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-limits-rs0-increased.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
initialDelaySeconds: 60
110110
periodSeconds: 30
111111
successThreshold: 1
112-
timeoutSeconds: 5
112+
timeoutSeconds: 10
113113
name: mongod
114114
ports:
115115
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-limits-rs0-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
initialDelaySeconds: 60
110110
periodSeconds: 30
111111
successThreshold: 1
112-
timeoutSeconds: 5
112+
timeoutSeconds: 10
113113
name: mongod
114114
ports:
115115
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-limits-rs0.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
initialDelaySeconds: 60
110110
periodSeconds: 30
111111
successThreshold: 1
112-
timeoutSeconds: 5
112+
timeoutSeconds: 10
113113
name: mongod
114114
ports:
115115
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
initialDelaySeconds: 60
110110
periodSeconds: 30
111111
successThreshold: 1
112-
timeoutSeconds: 5
112+
timeoutSeconds: 10
113113
name: mongod
114114
ports:
115115
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
initialDelaySeconds: 60
110110
periodSeconds: 30
111111
successThreshold: 1
112-
timeoutSeconds: 5
112+
timeoutSeconds: 10
113113
name: mongod
114114
ports:
115115
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
initialDelaySeconds: 60
110110
periodSeconds: 30
111111
successThreshold: 1
112-
timeoutSeconds: 5
112+
timeoutSeconds: 10
113113
name: mongod
114114
ports:
115115
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
initialDelaySeconds: 60
110110
periodSeconds: 30
111111
successThreshold: 1
112-
timeoutSeconds: 5
112+
timeoutSeconds: 10
113113
name: mongod
114114
ports:
115115
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-requests-rs0-increased-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ spec:
110110
initialDelaySeconds: 60
111111
periodSeconds: 30
112112
successThreshold: 1
113-
timeoutSeconds: 5
113+
timeoutSeconds: 10
114114
name: mongod
115115
ports:
116116
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-requests-rs0-increased.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ spec:
110110
initialDelaySeconds: 60
111111
periodSeconds: 30
112112
successThreshold: 1
113-
timeoutSeconds: 5
113+
timeoutSeconds: 10
114114
name: mongod
115115
ports:
116116
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-requests-rs0-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ spec:
110110
initialDelaySeconds: 60
111111
periodSeconds: 30
112112
successThreshold: 1
113-
timeoutSeconds: 5
113+
timeoutSeconds: 10
114114
name: mongod
115115
ports:
116116
- containerPort: 27017

Diff for: e2e-tests/limits/compare/statefulset_no-requests-rs0.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ spec:
110110
initialDelaySeconds: 60
111111
periodSeconds: 30
112112
successThreshold: 1
113-
timeoutSeconds: 5
113+
timeoutSeconds: 10
114114
name: mongod
115115
ports:
116116
- containerPort: 27017

Diff for: e2e-tests/monitoring-2-0/compare/deployment_monitoring-mongos-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ spec:
8888
initialDelaySeconds: 60
8989
periodSeconds: 30
9090
successThreshold: 1
91-
timeoutSeconds: 5
91+
timeoutSeconds: 10
9292
name: mongos
9393
ports:
9494
- containerPort: 27017

Diff for: e2e-tests/monitoring-2-0/compare/deployment_monitoring-mongos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ spec:
8888
initialDelaySeconds: 60
8989
periodSeconds: 30
9090
successThreshold: 1
91-
timeoutSeconds: 5
91+
timeoutSeconds: 10
9292
name: mongos
9393
ports:
9494
- containerPort: 27017

Diff for: e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg-oc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ spec:
102102
initialDelaySeconds: 60
103103
periodSeconds: 30
104104
successThreshold: 1
105-
timeoutSeconds: 5
105+
timeoutSeconds: 10
106106
name: mongod
107107
ports:
108108
- containerPort: 27017

0 commit comments

Comments
 (0)