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

peername set to the peerid in pin status response #1569

Closed
olizilla opened this issue Feb 10, 2022 · 2 comments
Closed

peername set to the peerid in pin status response #1569

olizilla opened this issue Feb 10, 2022 · 2 comments
Assignees
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@olizilla
Copy link
Contributor

When calling ipfs-cluster-ctl status [cid], why is peername set to the peerId rather than the name when the pin status is remote e.g.

{
  "cid": {
    "/": "bafybeicnd5g3aod777xtoeb2qzx2k64w52f3qpdo4da3nmimbvdydpylgu"
  },
  "name": "",
  "peer_map": {
    "12D3KooWF6uxxqZf4sXpQEbNE4BfbVJWAKWrFSKamxmWm4E9vyzd": {
      "peername": "12D3KooWF6uxxqZf4sXpQEbNE4BfbVJWAKWrFSKamxmWm4E9vyzd",
      "status": "remote",
      "timestamp": "2022-02-09T16:53:43.922293806Z",
      "error": "",
      "attempt_count": 0,
      "priority_pin": false
    },
    "12D3KooWFe387JFDpgNEVCP5ARut7gRkX7YuJCXMStpkq714ziK6": {
      "peername": "12D3KooWFe387JFDpgNEVCP5ARut7gRkX7YuJCXMStpkq714ziK6",
      "status": "remote",
      "timestamp": "2022-02-09T16:53:43.922293806Z",
      "error": "",
      "attempt_count": 0,
      "priority_pin": false
    },
    "12D3KooWHdBjmicdXu5X57mQ65oBpfy4p3ca5p31kfJT9FSUFu3P": {
      "peername": "web3-storage-dc13-2",
      "status": "pinned",
      "timestamp": "0001-01-01T00:00:00Z",
      "error": "",
      "attempt_count": 0,
      "priority_pin": false
    },
    "12D3KooWJeRQfPbiv5U2RqQ9yK3qijbNxKarKEGLMkGrfXJuZ2Bo": {
      "peername": "web3-storage-sv15-2",
      "status": "pinned",
      "timestamp": "0001-01-01T00:00:00Z",
      "error": "",
      "attempt_count": 0,
      "priority_pin": false
    },
    "12D3KooWLWFUri36dmTkki6o9PwfQNwGb2gsHuKD5FdcwzCXYnwc": {
      "peername": "web3-storage-am6-2",
      "status": "pinned",
      "timestamp": "0001-01-01T00:00:00Z",
      "error": "",
      "attempt_count": 0,
      "priority_pin": false
    },
    "12D3KooWMbibcXHwkSjgV7VZ8TMfDKi6pZvmi97P83ZwHm9LEsvV": {
      "peername": "12D3KooWMbibcXHwkSjgV7VZ8TMfDKi6pZvmi97P83ZwHm9LEsvV",
      "status": "remote",
      "timestamp": "2022-02-09T16:53:43.922293806Z",
      "error": "",
      "attempt_count": 0,
      "priority_pin": false
    }
  }
}

We're recording the peernames of nodes and have been upserting the info which is causing our peername column to endlessly churn between the name and the peerId for a given node. We can add a check to guard against it, but I wonder if this was something we should smooth out in cluster if possible?

@olizilla olizilla added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Feb 10, 2022
@hsanjuan
Copy link
Collaborator

hey @olizilla , this is because remote peers are not queried for pin information and the local peer does not know their peernames.

However, since #1556 this is mostly fixed (such information will be cached by the local peer and used). There is a chance that if the peer is new etc. the peer ID appears instead of the name until the information is cached. Would it be better if the peer name was empty in such case?

@hsanjuan hsanjuan added this to the Release v0.14.5 milestone Feb 14, 2022
@hsanjuan hsanjuan added kind/enhancement A net-new feature or improvement to an existing feature and removed kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Feb 14, 2022
@hsanjuan hsanjuan self-assigned this Feb 14, 2022
@olizilla
Copy link
Contributor Author

👋
Aye, it's minor, but removing the peername property would be the clearest signal in that case. If that's a pain then leaving it empty would be ok.

hsanjuan added a commit that referenced this issue Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants