-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#7867] docdb: Fix redirection logic in master-path-handlers to respe…
…ct broadcast addresses. Summary: Conditionally use broadcast addresses when redirecting http requests in master. As is already done for public vs private addresses for making rpcs, we change the URL redirection logic to respect the use_private_ip flag and the node zoning when forwarding HTTP requests. Test Plan: Local testing with yugabyted. Tested the redirect logic by using a non-leader master to access the UI. Tested the logic when server_broadcast_addresses is empty - it still redirects using a private address instead. Testing the logic when the leader is down - it shows the expected error message (Not found (yb/master/master-path-handlers.cc:205): Unable to locate leader master to redirect this request: /) Reviewers: sanketh, skedia Reviewed By: skedia Subscribers: ybase, bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D16780
- Loading branch information
Showing
2 changed files
with
46 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters