Context : I have a cluster of 4 peers, a fifth peer connect time to time to the cluster when Internet is available.
If I pin a file when the 5 peers are online, pinning is done to the five peers and a ipfs-cluster-ctl status shows PINNED which means for me “the file is available locally and can be downloaded through gateway”
If I pin a file when only 4 peers and the fifth peer comes online later on, ipfs-cluster-ctl status shows something different, the peer knows about the file, but the file seems only available remotely
ipfs-flo : REMOTE | 2018-12-07T09:51:23Z
Thus I can not download this file through the peer’s gateway.
Is there any solution for a peer joining the cluster to automatically download all the data that have been pinned during the time the peer was offline ?
Right, the peer picked it up, however the status remain on “PINNING”. I don’t know really what is going on but the file is around 2MB and the status stays the same. It is just hanging.
As the result, the file is not available on the gateway.
I have the general feeling that ipfs-cluster is not recommended to be used with peers behind an unreliable Internet connection. Am I right ? What would be the strategy then to be able to share pins on ipfs devices that stays behind a firewall and a crappy Internet connection ?
Right, the peer picked it up, however the status remain on “PINNING”.
Then this means that IPFS cannot fetch this file. It’s not really a cluster problem. If you are under a very constrained environment where libp2p’s NAT hole-punching does not work, it may be that your IPFS peer cannot contact or reach the providers of your file. Otherwise, it might also just be a bug in ipfs or something, so try re-starting the daemon and the cluster peer (or running ipfs-cluster-ctl recover <cid> on the hash when it turns to error).
I have the general feeling that ipfs-cluster is not recommended to be used with peers behind an unreliable Internet connection
There are several considerations. Raft is not very suited to opportunistic peers. NAT-ing may not be working well and well, it all depends how unreliable that connection is. We are preparing to replace raft altogether which should improve all these scenarios a lot.
I’m not able to have a stable cluster right now even after testing several configurations.
I have still issue with replicating pin on peers. Some of my peers still have a “PINNING” status even if they have a stable Internet connexion and no inboud filtering. recover option does not help.
I’m going to stick to IPFS and synchronise manually the pin over the nodes.
I’ll follow the development of this nice tool and I’m looking forward a more resilient sync tool than raft.
@fheslouin if status stays in PINNING this is because ipfs does not manage to fetch and pin the files. That is not a cluster problem (or related to raft). if you pin manually in ipfs daemons running in the nodes that stay PINNING it will probably hang because that’s essentially what cluster is trying to do.
Unless! I just realized the cluster peer might misconfigured. Is https://cluster.ipfs.io/documentation/configuration/#ipfshttppin_method set to refs and concurrent_pins set to something > 1 ? It may be that if one pin is not fetchable it is blocking any others from being pinned.