Repository navigation
Register HotRestartingParent as udp forwarding packet recipient - #29369
Conversation
… hot restart Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
|
This is still a draft? Do you mean to actually send it out for review? |
I did. |
Signed-off-by: Raven Black <[email protected]>
| listener_manager_->stopListeners(ListenerManager::StopListenersType::All); | ||
| Network::ExtraShutdownListenerOptions empty_options; | ||
| listener_manager_->stopListeners(ListenerManager::StopListenersType::All, | ||
| options.has_value() ? *options : empty_options); |
There was a problem hiding this comment.
nits: s/empty_options/{}
There was a problem hiding this comment.
initializer_list cannot be used on right hand side of operator :
There was a problem hiding this comment.
Worked with Network::ExtraShutdownListenerOptions{} though, and in all the other locations {}. I thought it didn't like it when you pass inline-constructed things as references, I guess maybe I'm mixing that up with some test context.
| void HotRestartingParent::Internal::drainListeners() { server_->drainListeners(); } | ||
| void HotRestartingParent::Internal::drainListeners() { | ||
| Network::ExtraShutdownListenerOptions options; | ||
| options.non_dispatched_udp_packet_handler_ = *this; |
There was a problem hiding this comment.
Is there a hot restarting test verifies that non_dispatched_udp_packet_handler_ is not nullopt?
There was a problem hiding this comment.
Updated a test to do this.
Signed-off-by: Raven Black <[email protected]>
| manager_->stopListeners(ListenerManager::StopListenersType::All, empty_options); | ||
| EXPECT_EQ(1, server_.stats_store_.counterFromString("listener_manager.listener_stopped").value()); | ||
| manager_->stopListeners(ListenerManager::StopListenersType::All, {); | ||
| EXPECT_EQ(1, | ||
| server_.stats_store_.counterFromString("listener_manager.listener_stopped").value()); | ||
|
|
||
| // Validate that adding a listener is not allowed after all listeners are stopped. | ||
| const std::string listener_bar_yaml = R"EOF( |
There was a problem hiding this comment.
Something wrong with the formatting in this file?
Signed-off-by: Raven Black <[email protected]>
RyanTheOptimist
left a comment
There was a problem hiding this comment.
Wow, this is incredibly clean! There's a lot of plumbing here, but it seems mostly mechanical. Thanks for splitting this work into easily digestible pieces!
| @@ -222,7 +222,8 @@ class ListenerManager { | |||
| * listeners on workers. Once a listener is stopped, any listener modifications are not allowed. | |||
| * @param stop_listeners_type indicates listeners to stop. | |||
There was a problem hiding this comment.
nit: Can we add options to this comment.
Signed-off-by: Raven Black <[email protected]>
- No change to `.bazelversion`. - Synced changes from `.bazelrc`, `ci/run_envoy_docker.sh`, `tools/code_format/config.yaml`, `tools/gen_compilation_database.py`. - Update the function signature of `drainListeners()` in [source/client/process_impl.cc](https://github.com/envoyproxy/nighthawk/blob/main/source/client/process_impl.cc) to accommodate envoyproxy/envoy#29369. Signed-off-by: jiajunye [[email protected]](mailto:[email protected])
Commit Message: Register HotRestartingParent as udp forwarding packet recipient
Additional Description: When listeners start draining during hot restart, pass them a reference to HotRestartingParent so that ActiveQuicListeners can forward non-routable UDP packets to the child instance.
Risk Level: Low, no behaviors are actually changed yet.
Testing: Existing coverage should cover all touched paths (except the TODO one).
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a