-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Use fully qualified hostname as default to advertise brokers #6235
Merged
massakam
merged 1 commit into
apache:master
from
merlimat:fix-advertised-hostname-master
Feb 7, 2020
Merged
Use fully qualified hostname as default to advertise brokers #6235
massakam
merged 1 commit into
apache:master
from
merlimat:fix-advertised-hostname-master
Feb 7, 2020
Conversation
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
sijie
approved these changes
Feb 6, 2020
massakam
approved these changes
Feb 6, 2020
tuteng
pushed a commit
to AmateurEvents/pulsar
that referenced
this pull request
Feb 23, 2020
tuteng
pushed a commit
that referenced
this pull request
Apr 13, 2020
(cherry picked from commit 4018d0b)
sijie
pushed a commit
that referenced
this pull request
Jun 26, 2020
### Motivation Similar to #6235, we need to ensure to always use the fully qualified hostname
codelipenghui
pushed a commit
to streamnative/pulsar-archived
that referenced
this pull request
Jul 14, 2020
…7360) ### Motivation Similar to apache#6235, we need to ensure to always use the fully qualified hostname (cherry picked from commit bafb373)
wolfstudy
pushed a commit
that referenced
this pull request
Jul 29, 2020
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Aug 24, 2020
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Aug 24, 2020
…7360) ### Motivation Similar to apache#6235, we need to ensure to always use the fully qualified hostname
dlg99
pushed a commit
to apache/bookkeeper
that referenced
this pull request
Feb 2, 2021
…in Java 11+ Descriptions of the changes in this PR: Update how hostname is retrieved when using hostname as identifier for stream storage to work consistenly between Java 8 and Java 11. ### Motivation Between Java 8 and Java 11, the value returned by `InetAddress.getLocalHost().getHostName()` changed from being the fully qualified name to just the short hostname. When running in a Kubernetes environment, it is necessary for the endpoint to be identied by its fully qualified name so that clients can connect. This same change was made in Pulsar in apache/pulsar#6235. I have tested this change in Kubernetes environment using Java 11. ### Changes This is a simple change from `getHostName` to `getCanonicalHostName()`. Master Issue: #2559 Reviewers: Andrey Yegorov <None>, Enrico Olivelli <eolivelli@gmail.com> This closes #2571 from cdbartholomew/stream-storage-endpoint-java11
dlg99
pushed a commit
to apache/bookkeeper
that referenced
this pull request
Feb 2, 2021
…in Java 11+ Descriptions of the changes in this PR: Update how hostname is retrieved when using hostname as identifier for stream storage to work consistenly between Java 8 and Java 11. ### Motivation Between Java 8 and Java 11, the value returned by `InetAddress.getLocalHost().getHostName()` changed from being the fully qualified name to just the short hostname. When running in a Kubernetes environment, it is necessary for the endpoint to be identied by its fully qualified name so that clients can connect. This same change was made in Pulsar in apache/pulsar#6235. I have tested this change in Kubernetes environment using Java 11. ### Changes This is a simple change from `getHostName` to `getCanonicalHostName()`. Master Issue: #2559 Reviewers: Andrey Yegorov <None>, Enrico Olivelli <eolivelli@gmail.com> This closes #2571 from cdbartholomew/stream-storage-endpoint-java11
dlg99
pushed a commit
to apache/bookkeeper
that referenced
this pull request
Feb 2, 2021
…in Java 11+ Descriptions of the changes in this PR: Update how hostname is retrieved when using hostname as identifier for stream storage to work consistenly between Java 8 and Java 11. ### Motivation Between Java 8 and Java 11, the value returned by `InetAddress.getLocalHost().getHostName()` changed from being the fully qualified name to just the short hostname. When running in a Kubernetes environment, it is necessary for the endpoint to be identied by its fully qualified name so that clients can connect. This same change was made in Pulsar in apache/pulsar#6235. I have tested this change in Kubernetes environment using Java 11. ### Changes This is a simple change from `getHostName` to `getCanonicalHostName()`. Master Issue: #2559 Reviewers: Andrey Yegorov <None>, Enrico Olivelli <eolivelli@gmail.com> This closes #2571 from cdbartholomew/stream-storage-endpoint-java11
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
There is a difference in getting hostnames between Java 8 and Java 11.
In Java 8
InetAddress.getLocalHost().getHostName()
was returning the fully qualified hostname while in 11 is returning the simple hostname. We should rather use thegetCanonicalHostName()
which is return the fully qualified hostname.This is the same method to get the advertised address for bookies as well.
Example: