-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
netutil: add url comparison without resolver to URLStringsEqual #13224
Conversation
If one of the nodes in the cluster has lost a dns record, restarting the second node will break it. This PR makes an attempt to add a comparison without using a resolver, which allows to protect cluster from dns errors and does not break the current logic of comparing urls in the URLStringsEqual function. You can read more in the issue #7798 Fixes #7798
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.
Thank you for the PR, few comments.
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
I found a bug in the test |
@ptabor please take a look. |
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.
Thank you.
PR etcd-io#13224 introduced an early exit when the names match. This change restores the previous behaviour by doing an explicit DNS resolution before checking the URLs for equality. Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
If one of the nodes in the cluster has lost a dns record,
restarting the second node will break it.
This PR makes an attempt to add a comparison without using a resolver,
which allows to protect cluster from dns errors and does not break
the current logic of comparing urls in the URLStringsEqual function.
You can read more in the issue #7798
Fixes #7798
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.