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

Automated cherry pick of #13224 #14572 #14573

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

pchan
Copy link
Contributor

@pchan pchan commented Oct 11, 2022

Cherry pick of #13224 on release-3.5.

#13224: netutil: add url comparison without resolver to

sakateka and others added 3 commits October 11, 2022 16:58
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 etcd-io#7798

Fixes etcd-io#7798

Signed-off-by: Prasad Chandrasekaran <[email protected]>
Co-authored-by: Lili Cosic <[email protected]>
Signed-off-by: Prasad Chandrasekaran <[email protected]>
@pchan
Copy link
Contributor Author

pchan commented Oct 11, 2022

/cc @ahrtr This fixes the issue raised in #14456 in version 3.5

@ahrtr
Copy link
Member

ahrtr commented Oct 11, 2022

Please add a changelog item for both 3.5 and 3.4 after you backport the PR to release-3.4.

for _, str := range us {
u, err := url.Parse(str)
if err != nil {
return nil, fmt.Errorf("failed to parse string to URL: %q", str)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to get the err included as well.

Suggested change
return nil, fmt.Errorf("failed to parse string to URL: %q", str)
return nil, fmt.Errorf("failed to parse string to URL: %q, %w", str, err)

Since you are just backporting the PR, so please feel free to resolve this in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will create separate PR to fix this.

Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thank you @pchan

@ahrtr ahrtr merged commit 3afd073 into etcd-io:release-3.5 Oct 12, 2022
@serathius serathius mentioned this pull request Nov 14, 2022
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants