feature: inbound only graceful draining#37873
Conversation
|
Fixes #35020 |
cfa48b0 to
5bd97d9
Compare
Fixes envoyproxy#35020. The inbound_only query param for the drain_listeners admin endpoint doesn't work with the graceful query parameter. As a result, outbound listeners will send connection: close headers to upstreams which is undesired. This PR adds the ability for drain_manager to drain in a single direction. Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
5bd97d9 to
18fa880
Compare
KBaichoo
left a comment
There was a problem hiding this comment.
Thank you for working on this -- few comments / questions:
- Was directional draining not working at all prior to this?
- Can you add release notes?
- Can you fillout the PR description
- Can you add an integration test draining inbound only listeners using the admin endpoint so we can have something testing this e2e.
- I think some other network filters support draining but probably don't support directionality, can those also be documented?
/wait
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
|
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
|
needs main merge /wait |
KBaichoo
left a comment
There was a problem hiding this comment.
Sorry for the delay, this mostly looks good. Thank you!
Documented where? Can you expand a bit on the ask?
According to https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/operations/draining some other network filters
support draining (Redis, Mongo, Thrift) but wouldn't support this newly added directional component?
Maybe documented in https://www.envoyproxy.io/docs/envoy/latest/operations/admin#operations-admin-interface-drain?
/wait
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
|
@KBaichoo I think this is ready for another round of review; thanks for the comments! |
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
KBaichoo
left a comment
There was a problem hiding this comment.
This looks great. Few small comments, almost there. Thank you.
/wait
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
|
/retest |
|
@ggreenway ping? |
Fixes envoyproxy#35020. The inbound_only query param for the drain_listeners admin endpoint doesn't work with the graceful query parameter. As a result, outbound listeners will send connection: close headers to upstreams which is undesired. This PR adds the ability for drain_manager to drain in a single direction. Prior to this change, the `inbound_only` query param on the [`drain_listeners` admin endpoint ](https://www.envoyproxy.io/docs/envoy/latest/operations/admin#operations-admin-interface-drain) only modified which listeners were stopped. If `graceful` is set, listeners of all directions are drained, regardless if `inbound_only` is set. If `skip_exit` is set, `inbound_only` has zero effect. This PR adds the ability to drain only inbound listeners, allowing outbound listeners to continue functioning as normal. This is useful in the Kubernetes sidecar use-case where outbound traffic should not set connection: close headers to the upstream. Risk Level: Medium fixes envoyproxy#35020 Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
This reverts commit 916594d. Signed-off-by: Ryan Northey <ryan@synca.io>
This reverts commit 916594d. Signed-off-by: Ryan Northey <ryan@synca.io>
Trying #37873 again to get to the bottom of the flakes that caused us to need to revert. This got a lot more complex after #38333, so I may need @yanavlasov to help me out with the proper semantics Commit Message: ``` Fixes #35020. The inbound_only query param for the drain_listeners admin endpoint doesn't work with the graceful query parameter. As a result, outbound listeners will send connection: close headers to upstreams which is undesired. This PR adds the ability for drain_manager to drain in a single direction. ``` Additional Description: Risk Level: Medium Testing: Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] --------- Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Trying envoyproxy#37873 again to get to the bottom of the flakes that caused us to need to revert. This got a lot more complex after envoyproxy#38333, so I may need @yanavlasov to help me out with the proper semantics Commit Message: ``` Fixes envoyproxy#35020. The inbound_only query param for the drain_listeners admin endpoint doesn't work with the graceful query parameter. As a result, outbound listeners will send connection: close headers to upstreams which is undesired. This PR adds the ability for drain_manager to drain in a single direction. ``` Additional Description: Risk Level: Medium Testing: Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] --------- Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Trying envoyproxy#37873 again to get to the bottom of the flakes that caused us to need to revert. This got a lot more complex after envoyproxy#38333, so I may need @yanavlasov to help me out with the proper semantics Commit Message: ``` Fixes envoyproxy#35020. The inbound_only query param for the drain_listeners admin endpoint doesn't work with the graceful query parameter. As a result, outbound listeners will send connection: close headers to upstreams which is undesired. This PR adds the ability for drain_manager to drain in a single direction. ``` Additional Description: Risk Level: Medium Testing: Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] --------- Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Trying envoyproxy#37873 again to get to the bottom of the flakes that caused us to need to revert. This got a lot more complex after envoyproxy#38333, so I may need @yanavlasov to help me out with the proper semantics Commit Message: ``` Fixes envoyproxy#35020. The inbound_only query param for the drain_listeners admin endpoint doesn't work with the graceful query parameter. As a result, outbound listeners will send connection: close headers to upstreams which is undesired. This PR adds the ability for drain_manager to drain in a single direction. ``` Additional Description: Risk Level: Medium Testing: Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] --------- Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Commit Message:
Additional Description: Prior to this change, the
inbound_onlyquery param on thedrain_listenersadmin endpoint only modified which listeners were stopped. Ifgracefulis set, listeners of all directions are drained, regardless ifinbound_onlyis set. Ifskip_exitis set,inbound_onlyhas zero effect. This PR adds the ability to drain only inbound listeners, allowing outbound listeners to continue functioning as normal. This is useful in the Kubernetes sidecar use-case where outbound traffic should not set connection: close headers to the upstream.Risk Level: Medium
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA] fixes #35020
[Optional Deprecated:]
[Optional API Considerations:]