Skip to content

Commit 32f66fb

Browse files
authored
Merge pull request #519 from BSWANG/fix-probe-timeout
fix healthcheck timeout due socat close-wait state
2 parents 2137f5b + f3380c5 commit 32f66fb

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

policy/policyinit.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ fi
123123
cleanup_felix
124124
# for health check
125125
if [ "$FELIX_HEALTHPORT" != "" ]; then
126-
exec socat PIPE TCP-LISTEN:"$FELIX_HEALTHPORT",fork,reuseaddr
126+
# shellcheck disable=SC2016
127+
exec socat TCP-LISTEN:"$FELIX_HEALTHPORT",bind=127.0.0.1,fork,reuseaddr system:'sleep 2;kill -9 $SOCAT_PID 2>/dev/null'
127128
else
128-
exec socat PIPE TCP-LISTEN:9099,fork,reuseaddr
129+
# shellcheck disable=SC2016
130+
exec socat TCP-LISTEN:9099,bind=127.0.0.1,fork,reuseaddr system:'sleep 2;kill -9 $SOCAT_PID 2>/dev/null'
129131
fi
130132
fi

terway-cilium.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,10 @@ spec:
263263
livenessProbe:
264264
tcpSocket:
265265
port: 9099
266-
host: localhost
266+
host: 127.0.0.1
267267
periodSeconds: 10
268268
initialDelaySeconds: 10
269269
failureThreshold: 6
270-
readinessProbe:
271-
tcpSocket:
272-
port: 9099
273-
host: localhost
274-
periodSeconds: 10
275270
volumeMounts:
276271
- mountPath: /lib/modules
277272
name: lib-modules

terway-multiip.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,10 @@ spec:
209209
livenessProbe:
210210
tcpSocket:
211211
port: 9099
212-
host: localhost
212+
host: 127.0.0.1
213213
periodSeconds: 10
214214
initialDelaySeconds: 10
215215
failureThreshold: 6
216-
readinessProbe:
217-
tcpSocket:
218-
port: 9099
219-
host: localhost
220-
periodSeconds: 10
221216
volumeMounts:
222217
- mountPath: /lib/modules
223218
name: lib-modules

terway.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,22 +181,17 @@ spec:
181181
livenessProbe:
182182
tcpSocket:
183183
port: 9099
184-
host: localhost
184+
host: 127.0.0.1
185185
periodSeconds: 10
186186
initialDelaySeconds: 10
187187
failureThreshold: 6
188-
readinessProbe:
189-
tcpSocket:
190-
port: 9099
191-
host: localhost
192-
periodSeconds: 10
193188
volumeMounts:
194189
- mountPath: /lib/modules
195190
name: lib-modules
196191

197192
volumes:
198193
- name: configvolume
199-
configMap:
194+
configMap:
200195
name: eni-config
201196
items:
202197
- key: eni_conf

0 commit comments

Comments
 (0)