Go to file
Hector Sanjuan 11124ee224 Fix: repinning does not re-allocate as needed
Long story: Since #1768 there has been a recurring repinning test failure with
Raft consensus.

Per the test, if a pin is allocated to a peer that has been shutdown,
submitting the pin again should re-allocate it to a peer that is still
running.

Investigation on why this test fails and why it fails only in Raft lead to
realizing that this and other similar tests, were passing by chance. The
needed re-allocations were made not by the new submission of the pin, but by
the automatic-repinning feature. The actual resubmitted pin was carrying the
same allocations (one of them being the peer that was down), but it was
silently failing because the RedirectToLeader() code path was using
cc.ctx and hitting the peer that had been shutdown, which caused it to error.

Fixing the context propagation, meant that we would re-overwrite the pin with
the old allocations, thus the actual behaviour did not pass the test.

So, on one side, this fix an number of tests that had not disabled automatic
repinning and was probably getting in the way of things. On the other side,
this removes a condition that prevents re-allocation of pins if they exists
and options have not changed.

I don't fully understand why this was there though, since the Allocate() code
does return the old allocations anyways when they are enough, so it should not
re-allocate randomly. I suspect this was preventing some misbehaviour in the
Allocate() code from the time before it was improved with multiple allocators
etc.
2022-09-27 12:31:24 +02:00
.github Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
adder Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
allocator/balanced Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
api Fix bad context propagation / deadlocks 2022-09-26 19:35:55 +02:00
cmd service: add crdt info, mark-dirty, mark-clean commands 2022-09-26 19:39:04 +02:00
cmdutils Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
config Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
consensus Fix: repinning does not re-allocate as needed 2022-09-27 12:31:24 +02:00
datastore Enable spell checking and fix spelling errors (using US locale) 2022-06-16 17:43:30 +02:00
docker Docker: allow controlling datastore backend via IPFS_CLUSTER_DATASTORE 2021-06-29 15:44:24 +02:00
informer Informer/disk: record issued metric weights as prometheus metric. 2022-06-23 11:58:35 +02:00
ipfsconn/ipfshttp Fix bad context propagation / deadlocks 2022-09-26 19:35:55 +02:00
monitor Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
observations Informer/disk: record issued metric weights as prometheus metric. 2022-06-23 11:58:35 +02:00
pintracker Fix: repinning does not re-allocate as needed 2022-09-27 12:31:24 +02:00
pstoremgr Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
rpcutil Migrate from ipfs/ipfs-cluster to ipfs-cluster/ipfs-cluster 2022-06-16 17:43:30 +02:00
sharness API: Support JWT bearer token authorization 2022-06-20 20:04:39 +02:00
state Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
test ipfsproxy: add tests for block/put and dag/put intercepts 2022-09-09 16:27:09 +02:00
version Release v1.0.3 2022-09-16 12:01:03 +02:00
.codeclimate.yml codeclimate 2018-08-07 20:12:05 +02:00
.codecov.yml Codecov: disable comments 2020-10-05 08:41:42 +02:00
.dockerignore Issue #259: Address CR comments 2017-12-04 13:59:48 +01:00
.gitignore Feat: ipfs-cluster-follow 2019-12-07 15:38:59 +01:00
add_test.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
allocate.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
CHANGELOG.md Changelog updates for v1.0.3 2022-09-15 18:29:54 +02:00
cluster_config_test.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
cluster_config.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
cluster_test.go Wait for IPFS to be ready during start 2022-09-15 16:40:34 +02:00
cluster.go Fix: repinning does not re-allocate as needed 2022-09-27 12:31:24 +02:00
clusterhost.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
config_test.go Migrate from ipfs/ipfs-cluster to ipfs-cluster/ipfs-cluster 2022-06-16 17:43:30 +02:00
connect_graph.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
CONTRIBUTING.md Rename links to use the ipfscluster.io domain 2022-06-16 17:43:30 +02:00
COPYRIGHT Dual-license the codebase. 2019-03-01 20:12:19 +00:00
docker-compose.yml Enable spell checking and fix spelling errors (using US locale) 2022-06-16 17:43:30 +02:00
Dockerfile Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
Dockerfile-bundle Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
Dockerfile-test Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
go.mod service: add crdt info, mark-dirty, mark-clean commands 2022-09-26 19:39:04 +02:00
go.sum service: add crdt info, mark-dirty, mark-clean commands 2022-09-26 19:39:04 +02:00
ipfscluster_test.go Fix: repinning does not re-allocate as needed 2022-09-27 12:31:24 +02:00
ipfscluster.go Wait for IPFS to be ready during start 2022-09-15 16:40:34 +02:00
LICENSE Chore: Add license file with URLS (#1014) 2020-03-06 13:52:19 +01:00
LICENSE-APACHE Chore: Add license file with URLS (#1014) 2020-03-06 13:52:19 +01:00
LICENSE-MIT Chore: Add license file with URLS (#1014) 2020-03-06 13:52:19 +01:00
logging.go Merge branch 'master' into feat/pinning-api 2022-03-10 13:41:54 +01:00
Makefile Error on mispellings 2022-06-16 17:43:30 +02:00
peer_manager_test.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
pnet_test.go Streaming Peers(): make Peers() a streaming call 2022-03-23 01:27:57 +01:00
README.md README: more improvements to badges 2022-06-16 17:43:30 +02:00
release.sh release.sh: improve script. 2021-01-14 14:06:53 +01:00
rpc_api.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
rpc_policy.go Feat: add a new "pinqueue" informer component 2022-06-16 17:43:29 +02:00
util.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00

IPFS Cluster

Made by Main project Discord Matrix channel pkg.go.dev Go Report Card codecov

Pinset orchestration for IPFS

logo

IPFS Cluster provides data orchestration across a swarm of IPFS daemons by allocating, replicating and tracking a global pinset distributed among multiple peers.

There are 3 different applications:

  • A cluster peer application: ipfs-cluster-service, to be run along with go-ipfs as a sidecar.
  • A client CLI application: ipfs-cluster-ctl, which allows easily interacting with the peer's HTTP API.
  • An additional "follower" peer application: ipfs-cluster-follow, focused on simplifying the process of configuring and running follower peers.

Are you using IPFS Cluster?

Please participate in the IPFS Cluster user registry.


Table of Contents

Documentation

Please visit https://ipfscluster.io/documentation/ to access user documentation, guides and any other resources, including detailed download and usage instructions.

News & Roadmap

We regularly post project updates to https://ipfscluster.io/news/ .

The most up-to-date Roadmap is available at https://ipfscluster.io/roadmap/ .

Install

Instructions for different installation methods (including from source) are available at https://ipfscluster.io/download .

Usage

Extensive usage information is provided at https://ipfscluster.io/documentation/ , including:

Contribute

PRs accepted. As part of the IPFS project, we have some contribution guidelines.

License

This library is dual-licensed under Apache 2.0 and MIT terms.

© 2022. Protocol Labs, Inc.