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

peers ls (and possibly other broadcast commands) fail when a peer is down #715

Closed
17 of 25 tasks
hsanjuan opened this issue Mar 11, 2019 · 3 comments
Closed
17 of 25 tasks
Assignees
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up

Comments

@hsanjuan
Copy link
Collaborator

hsanjuan commented Mar 11, 2019

Pre-check

  • This is not a IPFS Cluster website content issue (file those here)
  • I read the troubleshooting section of the website and it did not help
  • I searched for similar issues in the repo without luck
  • All my peers are running the same cluster version
  • All my peers are configured using the same cluster secret

Basic information

  • Version information (mark as appropiate):
    • Master
    • Release candidate for next version
    • Latest stable version
    • An older version I should not be using
  • Type (mark as appropiate):
    • Bug
    • Feature request
    • Enhancement
  • Operating system (mark as appropiate):
    • Linux
    • macOS
    • Windows
    • Other: which?
  • Installation method (mark as appropiate):
    • Binaries from dist.ipfs.io
    • Built from sources
    • Docker
    • Snap
    • Other: which?

Description

Pretty sure this is null-multiaddress related: https://discuss.ipfs.io/t/has-anyone-seen-this-error-cannot-unmarshal-object-into-go-struct-field/5007/4

70% sure that fix involves fixing deserialization of our types.go/Multiaddr or is somewhat related (either Undef cids or multiaddresses).

@hsanjuan hsanjuan added kind/bug A bug in existing code (including security flaws) help wanted Seeking public contribution on this issue exp/novice Someone with a little familiarity can pick up status/ready Ready to be worked P1 High: Likely tackled by core team if no one steps up labels Mar 11, 2019
@kishansagathiya kishansagathiya self-assigned this Mar 14, 2019
@kishansagathiya
Copy link
Contributor

70% sure that fix involves fixing deserialization of our types.go/Multiaddr or is somewhat related (either Undef cids or multiaddresses).

Yup, failing during unmarshaling https://github.com/ipfs/ipfs-cluster/blob/508131081124bc8289b762ffb7e0e0572798e9be/api/rest/client/request.go#L118

@kishansagathiya
Copy link
Contributor

This is happening because if a peer in down, on peer ls IPFSID is empty.

type IPFSID struct {
	ID        peer.ID     `json:"id" codec:"i,omitempty"`
	Addresses []Multiaddr `json:"addresses" codec:"a,omitempty"`
	Error     string      `json:"error" codec:"e,omitempty"`
}

If I just omitempty ID from IPFSID, thing would work with a message for the peer which is down, like

<peer.ID Qm*trvuVP> | ERROR: dial backoff

@kishansagathiya
Copy link
Contributor

Resolved with #719

@ghost ghost removed the status/ready Ready to be worked label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

No branches or pull requests

2 participants