Repository navigation
test/listener_ecds: Wait for the workers before connecting - #49219
Conversation
`BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as Signed-off-by: Ryan Northey <[email protected]> envoyproxy#49202 did for the same test of network ECDS.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for this test-only change to synchronize connections with listener readiness.
No open issues 🎉
What changed in this PR
This test-only change prevents BasicFailWithoutDefault from connecting before listener workers are ready, addressing intermittent timeouts while waiting for extension_config_missing.
Changes:
- Waits for listener readiness and
listener_manager.workers_startedbefore connecting. - Aligns startup synchronization with other listener ECDS tests and the network ECDS fix in #49202.
| File | Description |
|---|---|
| test/integration/listener_extension_discovery_integration_test.cc | Adds readiness waits and an explanatory comment before the test client connects. |
Review effort: Balanced
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. Signed-off-by: Ryan Northey <[email protected]>
| test_server_->waitUntilListenersReady(); | ||
| test_server_->waitForGauge("listener_manager.workers_started", Ge(1)); |
There was a problem hiding this comment.
I think this is the same thing I've commented before, and you concluded that this does work the same without the metric check; it's better without the metric check, since the test isn't about validating that metric and the other wait is more readable.
There was a problem hiding this comment.
Agreed: waitUntilListenersReady() only returns once the workers have added the listener, so the gauge wait adds nothing. Dropped in 6f7c7ab.
`waitUntilListenersReady()` already waits for the workers to add the listener, and the test is not about that metric. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners, which only completes once the workers have added them, as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners, which only completes once the workers have added them, as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. Signed-off-by: Ryan Northey <[email protected]>
`BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners, which only completes once the workers have added them, as #49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. (cherry picked from commit 998221c) Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. (cherry picked from commit 998221c) Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. (cherry picked from commit 998221c) Signed-off-by: Ryan Northey <[email protected]>
`BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as #49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. (cherry picked from commit 998221c) Signed-off-by: Ryan Northey <[email protected]>
…y#49219) `BasicFailWithoutDefault` connects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting for `extension_config_missing`. Wait for the listeners and for `listener_manager.workers_started`, as the other tests in this file do in `sendDataVerifyResults()`, and as envoyproxy#49202 did for the same test of network ECDS. Backport note: picked from the pull request ahead of its merge to main. This branch waits with `waitForCounterGe()` and `waitForGaugeGe()`. (cherry picked from commit 998221c) Signed-off-by: Ryan Northey <[email protected]>
`BasicFailWithoutDefault` still fails in CI after envoyproxy#49219 (asan, timed out waiting for `listener.listener_stat.extension_config_missing`). envoyproxy#49219 added `waitUntilListenersReady()`, which waits for the workers to add the listeners the server had when it was created. The listener here comes from LDS, and when LDS has not delivered it by then there is nothing to wait for, so the call returns at once. The client then connects before `listen()`, is refused, and the counter never moves. Also wait for `listener_manager.workers_started`, as every other test in this file does in `sendDataVerifyResults()`. Testing: the whole target with `--config=asan` on RBE, 200 runs each (the isolated test did not fail in 1000 runs): | | failed | | --- | --- | | main (a7bbc3e) | 3 | | main with stat dumps added | 1 | | this change | 0 | In the failing run with stat dumps, `listener_manager.workers_started` and `listener_create_success` were still 0 after `waitUntilListenersReady()` returned, and the write failed with an unexpected disconnect. Risk Level: low (test only) Signed-off-by: Ryan Northey <[email protected]>
`BasicFailWithoutDefault` still fails in CI after envoyproxy#49219 (asan, timed out waiting for `listener.listener_stat.extension_config_missing`). envoyproxy#49219 added `waitUntilListenersReady()`, which waits for the workers to add the listeners the server had when it was created. The listener here comes from LDS, and when LDS has not delivered it by then there is nothing to wait for, so the call returns at once. The client then connects before `listen()`, is refused, and the counter never moves. Also wait for `listener_manager.workers_started`, as every other test in this file does in `sendDataVerifyResults()`. Testing: the whole target with `--config=asan` on RBE, 200 runs each (the isolated test did not fail in 1000 runs): | | failed | | --- | --- | | main (a7bbc3e) | 3 | | main with stat dumps added | 1 | | this change | 0 | In the failing run with stat dumps, `listener_manager.workers_started` and `listener_create_success` were still 0 after `waitUntilListenersReady()` returned, and the write failed with an unexpected disconnect. Risk Level: low (test only) Signed-off-by: Ryan Northey <[email protected]>
BasicFailWithoutDefaultconnects as soon as the config failure has completed warming, but the listener only starts listening once the workers have added it. The client can connect before that, and the test then times out waiting forextension_config_missing.Wait for the listeners and for
listener_manager.workers_started, as the other tests in this file do insendDataVerifyResults(), and as #49202 did for the same test of network ECDS.Seen in postsubmit CI on main (tsan,
BasicFailWithoutDefault/2:timed out waiting for listener.listener_stat.extension_config_missing).Testing:
*ListenerExtensionDiscoveryIntegrationTest.BasicFailWithoutDefault*with--config=tsanon RBE, 1000 runs each:All of the failures on main were the timeout on
listener.listener_stat.extension_config_missing.Risk Level: low (test only)
Fixes #26939