Skip to content

Commit

Permalink
Merge pull request #519 from BSWANG/fix-probe-timeout
Browse files Browse the repository at this point in the history
fix healthcheck timeout due socat close-wait state
  • Loading branch information
l1b0k authored Aug 10, 2023
2 parents 2137f5b + f3380c5 commit 32f66fb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
6 changes: 4 additions & 2 deletions policy/policyinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ fi
cleanup_felix
# for health check
if [ "$FELIX_HEALTHPORT" != "" ]; then
exec socat PIPE TCP-LISTEN:"$FELIX_HEALTHPORT",fork,reuseaddr
# shellcheck disable=SC2016
exec socat TCP-LISTEN:"$FELIX_HEALTHPORT",bind=127.0.0.1,fork,reuseaddr system:'sleep 2;kill -9 $SOCAT_PID 2>/dev/null'
else
exec socat PIPE TCP-LISTEN:9099,fork,reuseaddr
# shellcheck disable=SC2016
exec socat TCP-LISTEN:9099,bind=127.0.0.1,fork,reuseaddr system:'sleep 2;kill -9 $SOCAT_PID 2>/dev/null'
fi
fi
7 changes: 1 addition & 6 deletions terway-cilium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,10 @@ spec:
livenessProbe:
tcpSocket:
port: 9099
host: localhost
host: 127.0.0.1
periodSeconds: 10
initialDelaySeconds: 10
failureThreshold: 6
readinessProbe:
tcpSocket:
port: 9099
host: localhost
periodSeconds: 10
volumeMounts:
- mountPath: /lib/modules
name: lib-modules
Expand Down
7 changes: 1 addition & 6 deletions terway-multiip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,10 @@ spec:
livenessProbe:
tcpSocket:
port: 9099
host: localhost
host: 127.0.0.1
periodSeconds: 10
initialDelaySeconds: 10
failureThreshold: 6
readinessProbe:
tcpSocket:
port: 9099
host: localhost
periodSeconds: 10
volumeMounts:
- mountPath: /lib/modules
name: lib-modules
Expand Down
9 changes: 2 additions & 7 deletions terway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,22 +181,17 @@ spec:
livenessProbe:
tcpSocket:
port: 9099
host: localhost
host: 127.0.0.1
periodSeconds: 10
initialDelaySeconds: 10
failureThreshold: 6
readinessProbe:
tcpSocket:
port: 9099
host: localhost
periodSeconds: 10
volumeMounts:
- mountPath: /lib/modules
name: lib-modules

volumes:
- name: configvolume
configMap:
configMap:
name: eni-config
items:
- key: eni_conf
Expand Down

0 comments on commit 32f66fb

Please sign in to comment.