Skip to content

xds: fix VHDS empty subscription behavior to prevent wildcarding subscription#34

Merged
whutwhu merged 3 commits intolinkedin:masterfrom
whutwhu:master
Jan 8, 2026
Merged

xds: fix VHDS empty subscription behavior to prevent wildcarding subscription#34
whutwhu merged 3 commits intolinkedin:masterfrom
whutwhu:master

Conversation

@whutwhu
Copy link
Contributor

@whutwhu whutwhu commented Jan 8, 2026

Description
This PR fixes an issue where the control plane incorrectly treated an empty resource_names_subscribe list in a VHDS DeltaDiscoveryRequest as a wildcard subscription.

According to the Virtual Host Discovery Service (VHDS) documentation, VHDS is designed for on-demand loading. Interpreting an empty subscription list as a wildcard is counter-productive to the "lazy-loading" goal of VHDS, as it could cause the control plane to push all virtual hosts to the proxy unexpectedly.

Changes

  1. Added logic to the xDS server to detect if the resource type is VHDS.
  2. If the resource type is VHDS and the resource_names_subscribe list is empty, the server will now treat the subscription as empty rather than fetching all resources.
  3. Preserved existing wildcard behavior for Listener, Cluster, Route, and Endpoint types.

Risk Level
Low. This specifically targets VHDS resource types and aligns with the expected xDS protocol behavior for on-demand resources.

Testing Done
I performed manual validation via the Observer to ensure the subscription is ignored when the resource is VHDS with either a wildcard or an empty subscription.

@whutwhu whutwhu changed the title xds: fix VHDS empty subscription behavior to prevent accidental wildcarding xds: fix VHDS empty subscription behavior to prevent accidental wildcarding subscription Jan 8, 2026
@whutwhu whutwhu changed the title xds: fix VHDS empty subscription behavior to prevent accidental wildcarding subscription xds: fix VHDS empty subscription behavior to prevent wildcarding subscription Jan 8, 2026
@gu0keno0
Copy link

gu0keno0 commented Jan 8, 2026

Can you also add a test plan?

Copy link

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good!

@whutwhu
Copy link
Contributor Author

whutwhu commented Jan 8, 2026

Can you also add a test plan?

I’ve added some unit tests and also did manual validation via the Observer to ensure the subscription is ignored when the resource is VHDS with either a wildcard or an empty subscription.

@whutwhu whutwhu merged commit 8324f4f into linkedin:master Jan 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments