Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support d2 symlink node in indis flow #933

Merged
merged 4 commits into from
Oct 2, 2023
Merged

Conversation

bohhyang
Copy link
Contributor

@bohhyang bohhyang commented Sep 19, 2023

Background

We need to support D2 symlink (d2 single master/primary feature, wiki) in INDIS flow.

The current ZK flow handles symlinks implicitly in SymlinkAwareZookeeper, which captures the data of a symlink node, immediately get the data of the actual master node, and send the fetched data to the symlink node callback. It can't be shared with INDIS flow.

For symlink clusters, the event bus subscribers, like "ClusterLoadBalancerSubscriber", "UriLoadBalancerSubscriber" subscribe to the symlinks ($FooClusterMaster), instead of the actual master node (FooCluster-prod-ltx1), we need to publish to event bus under the symlink names.
For other clusters, we need to publish under its original name. Note that these clusters could be either:

  1. regular clusters requested normally.
  2. clusters that were pointed by a symlink previously, but no longer the case after the symlink points to other clusters.

Changes

Subscribe to and handle d2 symlink node data in xDSClient and the xDS-to-d2 data adaptor.

Test Done

build and unit tests.
Verified with Toki qei deployment that the normal service, cluster, and uri nodes can be fetched successfully.
Will need to test fetching the symlink node with d2-proxy after release (due to SI-34767, the snapshot can't build with d2-proxy).

@bohhyang bohhyang marked this pull request as ready for review September 20, 2023 01:10
@bohhyang bohhyang merged commit c5cff52 into master Oct 2, 2023
2 checks passed
@bohhyang bohhyang deleted the bohan/supportSymlink branch October 2, 2023 18:57
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