-
Notifications
You must be signed in to change notification settings - Fork 312
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
Fix PD --peer-urls flag to use listen_host variable #949
Conversation
Codecov Report
@@ Coverage Diff @@
## master #949 +/- ##
==========================================
- Coverage 55.86% 52.05% -3.82%
==========================================
Files 263 263
Lines 19513 19513
==========================================
- Hits 10901 10157 -744
- Misses 6883 7713 +830
+ Partials 1729 1643 -86
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but we might need more tests before releasing this.
6c6d184
to
c3a66cd
Compare
This commit updates run_pd.sh template to use `listen_host` for --peer-urls flag instead of `host`. This allows us to use server hostname instead of IP addresse. Without this change if PD service is declared using hostname it fails to start, reporting an error that it can not bind to given interface. Metadata variable `listen_host` was introduced in pingcap#495 and is already used for the --client-urls flag. This should resolve pingcap#337 and partially implement pingcap#691.
c3a66cd
to
174b11e
Compare
/merge |
Can merge label has been added. Git tree hash: 6df2551
|
@fln: Your PR has out-of-dated and I have automatically updated it for you. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the tidb-community-bots/ti-community-prow repository. |
What problem does this PR solve?
This allows us to use server host name instead of IP address. Without
this change if PD service is declared using host name it fails to start,
reporting an error that it can not bind to given interface.
Metadata variable
listen_host
was introduced in #495 and is already used forthe
--client-urls
flag.This should resolve #337 and partially implement #691 .
What is changed and how it works?
This commit updates
run_pd.sh
andrun_pd_scale.sh.tpl
templates to uselisten_host
for--peer-urls
flag insteadof host
.Check List
Tests
No code. Tested with integration tests in #950.
Side effects
Breaking backward compatibility
If existing installations relied on host field to be used as address for accepting peer connections this change could be treated as breaking change. Default value of listen_host is 0.0.0.0 so it should not break existing clusters.
Some might want to use different listen addresses for peer and client connections. However I think this would add unnecessary complexity and not worth supporting.
Related changes
Need to update the documentation
Not sure where metadata file is properly documented. So far I have used source code to understand what is expected in the metadata.yaml file.
Release notes: