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

Add support in nomad for supporting raft 3 protocol peers.json #5629

Merged
merged 1 commit into from
May 3, 2019
Merged

Add support in nomad for supporting raft 3 protocol peers.json #5629

merged 1 commit into from
May 3, 2019

Conversation

hbasappa
Copy link

Seeing the following error while following https://www.nomadproject.io/guides/operations/outage.html for raft protocol 3.

nomad: failed to start Raft: recovery failed to parse peers.json: json: cannot unmarshal object into Go value of type string

This PR fixes the above issue.

@hashicorp-cla
Copy link

hashicorp-cla commented Apr 30, 2019

CLA assistant check
All committers have signed the CLA.

@notnoop
Copy link
Contributor

notnoop commented May 1, 2019

Thank you for submitting this issue and it's a bug for sure. The code is correct - but I'd love to see test for it if we can. Also, can we sign the CLA?

@notnoop notnoop self-assigned this May 2, 2019
if s.config.RaftConfig.ProtocolVersion < 3 {
configuration, err = raft.ReadPeersJSON(peersFile)
} else {
configuration, err = raft.ReadConfigJSON(peersFile)
Copy link
Contributor

@notnoop notnoop May 3, 2019

Choose a reason for hiding this comment

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

Now that I think about it - when running under version 3 - we may need to attempt to read in both formats. I'll double check the raft track - but I suspect at version 2 - it starts writing peers file in new format. Nevermind, this matches consul implementation in https://github.com/hashicorp/consul/pull/3007/files . Thanks!

@notnoop notnoop merged commit 0e21642 into hashicorp:master May 3, 2019
notnoop pushed a commit that referenced this pull request May 8, 2019
@github-actions
Copy link

github-actions bot commented Feb 9, 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 Feb 9, 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.

3 participants