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

cmd/mongodb-healthcheck/main.go

Lines changed: 4 additions & 4 deletions
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
}

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

Lines changed: 1 addition & 1 deletion
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

e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter.yml

Lines changed: 1 addition & 1 deletion
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

e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter-oc.yml

Lines changed: 1 addition & 1 deletion
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

e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter.yml

Lines changed: 1 addition & 1 deletion
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

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

Lines changed: 1 addition & 1 deletion
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

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

Lines changed: 1 addition & 1 deletion
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

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

Lines changed: 1 addition & 1 deletion
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

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

Lines changed: 1 addition & 1 deletion
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

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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)