-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Draining inboundonly and graceful do not work together #35020
Copy link
Copy link
Closed
Labels
Description
If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via emailing
envoy-security@googlegroups.com where the issue will be triaged appropriately.
Title: Draining inboundonly and graceful do not work together
Description:
when draining listeners with inboundonly&graceful&skip_exit, the inboundonly attribute is ignored.
You can see here it is never used at all:
envoy/source/server/admin/listeners_handler.cc
Lines 31 to 43 in 277722e
| if (graceful) { | |
| // Ignore calls to /drain_listeners?graceful if the drain sequence has | |
| // already started. | |
| if (!server_.drainManager().draining()) { | |
| server_.drainManager().startDrainSequence([this, stop_listeners_type, skip_exit]() { | |
| if (!skip_exit) { | |
| server_.listenerManager().stopListeners(stop_listeners_type, {}); | |
| } | |
| }); | |
| } | |
| } else { | |
| server_.listenerManager().stopListeners(stop_listeners_type, {}); | |
| } |
Repro steps:
curl httpbin.org/get -v and look for connection: close header. Note this goes through an outbound listener.
- Before: no close.
curl -X POST localhost:15000/'drain_listeners?inboundonly: no close header setcurl -X POST localhost:15000/'drain_listeners?inboundonly&graceful&skip_exit: close header is set unexpectedly
Reactions are currently unavailable