Skip to content

test/kv_store: Restart the SDS upstream on the same port - #49128

Merged
phlax merged 2 commits into
envoyproxy:mainfrom
phlax:test-kvstore-sds-port
Nov 13, 2026
Merged

phlax merged 2 commits into
envoyproxy:mainfrom
phlax:test-kvstore-sds-port

Conversation

@phlax

@phlax phlax commented Nov 10, 2026

Copy link
Copy Markdown
Member

The Google gRPC client dials an address rather than a cluster, and that address is the authority the secret is stored under in the KV store. On restart the test created the SDS upstream on a fresh port but left the SDS config naming the old one, so loading the secret from the KV store depended on the old port refusing the connection. Anything else that had bound it in the meantime accepted the stream instead, SDS was never restored and the test timed out waiting for ssl_context_update_by_sds (xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same and the port cannot be taken by anything else.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change to preserve the SDS upstream port across restarts.

No open issues 🎉

What changed in this PR

This PR stabilizes the KV-store xDS delegate integration test by restarting the SDS upstream on its original port, preserving the authority used by the Google gRPC client and cached secrets.

Changes:

  • Capture the SDS upstream’s port before teardown and reuse it on restart.
  • Document why retaining the port prevents unrelated listeners from interfering with KV-store fallback.
File Description
contrib/​config/​test/​kv_store_xds_delegate_integration_test.cc Reuse the original SDS port on restart and explain the fallback dependency.

Review effort: Balanced

@phlax
phlax force-pushed the test-kvstore-sds-port branch from f7ffe45 to 4e2cb1f Compare November 11, 2026 23:33
@phlax
phlax requested a review from ggreenway November 11, 2026 23:34
@phlax

phlax commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

@ggreenway ptal - this is a follow-up to #49080 in the same test (the other half of that restart flake). Rebased to main.

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that
had bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
@phlax
phlax force-pushed the test-kvstore-sds-port branch from 4e2cb1f to 66b03f8 Compare November 13, 2026 13:22
@phlax phlax added the backport/review Request to backport to stable releases label Nov 13, 2026
@phlax
phlax merged commit fd22045 into envoyproxy:main Nov 13, 2026
25 checks passed
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 17, 2026
The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 17, 2026
The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 18, 2026
…49128)

The Google gRPC client dials an address rather than a cluster, and that
address is the authority the secret is stored under in the KV store. On
restart the test created the SDS upstream on a fresh port but left the
SDS config naming the old one, so loading the secret from the KV store
depended on the old port refusing the connection. Anything else that had
bound it in the meantime accepted the stream instead, SDS was never
restored and the test timed out waiting for ssl_context_update_by_sds
(xds.kv_store.load_success 1 rather than 2).

Bind the new SDS upstream to the old port: the authority stays the same
and the port cannot be taken by anything else.

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit fd22045)
Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/review Request to backport to stable releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants