Skip to content

hot restart: child should wait sockets to be created when reuse_port is enabled #14295

@caitong93

Description

@caitong93

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions