Repository navigation
Conversation
|
👍🏻 |
|
@firecow Did you verify that the Listener init manager wait on policy update meaningfully changes behavior? The wait delays both listener socket Also, please squash commits as we don't do that automatically on merge :-) |
|
+1 on @jrajahalme point |
|
Also needs rebasing due to conflict with |
Listeners started accepting connections before the first NetworkPolicy update was installed, so connections accepted in that window had no policy for local endpoints and every request on them failed with 500 for the lifetime of the connection. Each listener now waits for the first policy update, or 5 seconds at most. Signed-off-by: Mads Jon Nielsen <madsjon@gmail.com>
7a879ff to
7a2358d
Compare
|
@jrajahalme @nezdolik Yes. On minikube with Cilium main and cilium-envoy from this branch, plus a 3 s sleep before the first NPDS update to widen the window, a keep-alive connection opened in the window got 500 on every request for the whole test without this change, and 200 with it. Neither build gave connection refused. While no listener is accepting, the client's connect just stalls until the listener starts, as it already does during a cilium-envoy restart. The change extends that by the time until the first policy update, so a connect may wait one TCP retransmit longer instead of succeeding and then failing every request. |
After a cilium-envoy restart the L7 listeners start accepting connections before the first NetworkPolicy update is installed, so a connection accepted in that window gets no policy filter state and every request on it answers 500 for as long as the client keeps it open, which this fixes by holding each listener's initialization until the first policy update is installed, or for at most 5 seconds so a stalled policy stream cannot keep listeners down.