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

Backport of Fix error handling in Client consulDiscoveryImpl into release/1.2.x #14454

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #14431 to be assessed for backporting due to the inclusion of the label backport/1.2.x.

The below text is copied from the body of the original PR.


Trivial one-liner fix, added a missing continue on non-nil error to avoid accidentally using a bad peer.

I ran into this while updating a single server test cluster to raft version 3 (https://www.nomadproject.io/docs/upgrade#upgrading-a-single-server-cluster-to-raft-version-3) by creating a raft.peers file manually and forgetting to include the port in the address field. This resulted in clients discovering via Consul to appear to successfully detect a server, but then later failing with errors like this:

client.rpc: error performing RPC to server: error="rpc error: failed to get conn: dial tcp: address <nil>: missing port in address" rpc=Node.GetClientAllocs server=<nil>

This fix will allow allow the client to check for other servers with functional Status.Peers responses, or in the absence of a functional server at least return a relevant error in the right place.

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/bugfix/consul_client_join_error_handling/mentally-central-albacore branch from 2b2a4c8 to c43d024 Compare September 2, 2022 19:22
@hc-github-team-nomad-core hc-github-team-nomad-core merged commit 7b739ae into release/1.2.x Sep 2, 2022
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/bugfix/consul_client_join_error_handling/mentally-central-albacore branch September 2, 2022 19:22
@github-actions
Copy link

github-actions bot commented Jan 1, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants