Ingress chart managed VIP fixes cleanup/startup
When the ingress pod (in routed mode, using a managed vip) moves from one host to another, it is sometimes observed that: 1. the vip interface is not removed on the original host, and 2. in some network topologies, the switch fabric is unable to find the new pod. This change updates the ingress deployment as follows: Adds a 5s sleep before the shutdown of the ingress container in order to allow the preStop action of the ingress-vip container to run completely. Updates the start action of the ingress-vip-init container to check if the vip is part of an existing connected subnet, and if so, sends a few gratuitous ARP messages to let the switch fabric to build its ARP cache. Change-Id: I784906865358566f42157dc2133569e4cb270cfa
This commit is contained in:
parent
4e7b8a183e
commit
6ca136bae4
@ -40,6 +40,7 @@ function start () {
|
||||
}
|
||||
|
||||
function stop () {
|
||||
sleep 5
|
||||
kill -TERM 1
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,11 @@ function start () {
|
||||
ip addr add ${addr} dev ${interface}
|
||||
fi
|
||||
ip link set ${interface} up
|
||||
garp_interface=$(ip route list match "${addr}" scope link | \
|
||||
awk '$2 == "dev" { print $3; exit }')
|
||||
if [ -n "${garp_interface}" ]; then
|
||||
arping -U -c 3 -I "${garp_interface}" "${addr%/*}" || true
|
||||
fi
|
||||
}
|
||||
|
||||
function sleep () {
|
||||
|
Loading…
Reference in New Issue
Block a user