hot restart: child should wait when reuse_port is enabled
Description:
In https://github.com/envoyproxy/envoy/blob/release/v1.16/source/server/server.cc#L569 , if reuse_port is enabled, listener_manager_->startWorkers(*worker_guard_dog_) does not wait actual sockets to be created. it's possible when parent stops listeners, child listeners are not listening.
Repro steps:
See repro steps here
Background
We are doing Envoy + VCL integration by intercepting system calls(we know TransportSocket extension, but there are some internal reasons). For the first socket() call for each worker, it will try to connect to VCL and block for 50ms.
When testing hot restarting, we found traffic loss which was caused by the issue described above.