Commit Graph

260 Commits

Author SHA1 Message Date
Hector Sanjuan
ea4dd7ed98
Set development version v0.14.0-next 2021-07-09 00:25:18 +02:00
Hector Sanjuan
f7e6f4a26c
Release v0.14.0 2021-07-09 00:24:00 +02:00
Hector Sanjuan
7a954e4fd2
Merge pull request #1405 from ipfs/feat/speed-up-pin-ls
restapi: allocationsHandler: skip filtering pins when not needed.
2021-07-08 23:56:07 +02:00
Hector Sanjuan
3ba7d79d0a restapi: allocationsHandler: skip filtering pins when not needed.
The restapi component supports filters for the pinset. This was done to keep
expected output when sharding was fully supported by filtering out "internal"
pins.

However this filter requires looping on the full pinset and re-allocating  and
usually does nothing. The useless copy is significant for really big pinsets.

Additionally, ipfs-cluster-ctl set the filter by default to "pins". By setting
it to "all" instead we can skip the whole filtering step and, in practice, get the
same results.
2021-07-08 23:27:55 +02:00
Hector Sanjuan
33c7b5d81a Fix #1403: ctl: ssl errors when talking to https remote peers
When using SSL and not talking to libp2p-http endpoints, we should not
resolve the dns names in the multiaddresses as otherwise we cannot
verify the https certificates used by the remote endpoint.
2021-07-08 23:21:36 +02:00
Hector Sanjuan
3ba27bebb4
Release candidate v0.14.0-rc3 2021-07-08 12:48:30 +02:00
Hector Sanjuan
46a14f9602 Set badger as default datastore for ipfs-cluster-service
This goes back to badger as the default. Testing performed on 0.14.0-rc2
showed very successful GC behaviour on large clusters.

Being that we run with badger at scale and that the main problem seems
resolved, it seems appropiate to default to badger.
2021-07-08 00:37:03 +02:00
Hector Sanjuan
493089d6d0
Release candidate v0.14.0-rc2 2021-07-06 16:56:53 +02:00
Hector Sanjuan
a5ae9fffc4
Release candidate v0.14.0-rc1 2021-07-06 14:07:21 +02:00
Hector Sanjuan
099e23cbd1 Run tests also using leveldb backend 2021-06-11 18:43:54 +02:00
Hector Sanjuan
0eef0ede89 Support a levelDB backend for cluster
Badger can take 1000x the amount of needed space if not GC'ed or compacted
(#1320), even for non heavy usage. Cluster has no provisions to run datastore
GC operations and while they could be added, they are not ensured to
help. Improvements on Badger v3 might help but would still need to GC
explicitally.

Cluster was however designed to support any go-datastore as backend.

This commit adds LevelDB support. LevelDB go-datastore wrapper is mature, does
not need GC and should work well for most cluster usecases, which are not
overly demanding.

A new `--datastore` flag has been added on init. The store backend is selected
based on the value in the configuration, similar to how raft/crdt is. The
default is set to leveldb. From now on it should be easier to add additional
backends, i.e. badgerv3.
2021-06-09 19:40:36 +02:00
Hector Sanjuan
bfe179e943
Set development version v0.13.3-next 2021-05-14 19:04:01 +02:00
Hector Sanjuan
dd87dba323
Release v0.13.3 2021-05-14 19:03:15 +02:00
Hector Sanjuan
656317d523
Release candidate v0.13.3-rc1 2021-05-03 17:56:24 +02:00
Hector Sanjuan
072f0bc722 Feat: support adding CAR files
This commit adds a new add option: "format".

This option specifies how IPFS Cluster is expected to build the DAG when
adding content. By default, it takes a "unixfs", which chunks and DAG-ifies as
it did before, resulting in a UnixFSv1 DAG.

Alternatively, it can be set to "car". In this case, Cluster will directly
read blocks from the CAR file and add them.

Adding CAR files or doing normal processing is independent from letting
cluster do sharding or not. If sharding is ever enabled, Cluster could
potentially shard a large CAR file among peers.

Currently, importing CAR files is limited to a single CAR file with a single
root (the one that is pinned). Future iterations may support multiple CARs
and/or multiple roots by transparently wrapping them.
2021-04-21 13:55:06 +02:00
Hector Sanjuan
51eed2f679
Set development version v0.13.2-next 2021-04-06 14:09:40 +02:00
Hector Sanjuan
812c8e3631
Release v0.13.2 2021-04-06 14:08:45 +02:00
Hector Sanjuan
d1700dbe81 Fixes #1319: Status wrongly shows pins as REMOTE
The Allocations of a pin that has been added with default replication factor
are kept even when the replication factor turns out to be -1.

This resulted in the Status(cid) code skipping calls to a number of peers
and setting the pin directly as REMOTE.

The fix, on one side makes sure Allocations is always nil when the replication
factor is -1. On the other size, lets the globalPinInfoCid method check the
replication factor value, rather than the number of allocations to decide if
any nodes are bound to be remote.

On the plus side, the pin tracker used the IsRemotePin method, which uses the
replication factor, so things were pinned even if the Status(cid) method shows
them as remote.
2021-03-24 00:47:15 +01:00
Oli Evans
5f9d2c90f8
chore: make wait step reachable regardless of flags
License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
2021-01-21 21:38:05 +00:00
Oli Evans
9cd70599aa
chore: wait after last CID is printed
License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
2021-01-21 20:43:47 +00:00
Oli Evans
fdd685b219
feat: add --wait flag to ipfs-cluster-ctl add
A "simplest thing that could work" implementation of adding a `--wait` flag to the ipfs-cluster-ctl add command.

Allows CI to wait for cluster to fully replicate the files just added before continuting, or fail if replication fails.

Fixes #1285

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
2021-01-21 09:58:27 +00:00
Hector Sanjuan
78b3111ed6
Set development version v0.13.1-next 2021-01-14 14:07:49 +01:00
Hector Sanjuan
7d0f5368cb
Release v0.13.1 2021-01-14 14:07:09 +01:00
Hector Sanjuan
299ce9ca0f
Release candidate v0.13.1-rc1 2021-01-14 00:32:38 +01:00
Hector Sanjuan
90208b45f9 health/alerts endpoint: brush up old PR 2021-01-13 22:09:21 +01:00
Hector Sanjuan
4bcb91ee2b Merge branch 'master' into feat/alerts 2021-01-13 21:08:49 +01:00
Hector Sanjuan
c78f7839a2
Merge pull request #1264 from ipfs/fix/help-line-ctl
Improve ipfs-cluster-ctl docs regarding --host
2020-10-20 16:11:18 +02:00
Hector Sanjuan
b65c848130 Improve ipfs-cluster-ctl docs regarding --host 2020-10-20 15:05:34 +02:00
Hector Sanjuan
a56ce73f92 Switch to building with -trimpath instead of asm and gc trimpath flags
Kudos to https://github.com/ipfs/distributions/pull/314
2020-10-20 14:32:20 +02:00
Omkar Prabhu
8f24691df4 moved to new line 2020-10-14 10:43:23 +05:30
Omkar Prabhu
904c2688ec host help character count reduced 2020-10-13 14:23:24 +05:30
Omkar Prabhu
fa8b0845d0 hosts input format changed 2020-10-08 22:44:03 +05:30
Omkar Prabhu
dc5ca5bd2b simplifies resolveaddr, multiple hosts as input 2020-10-07 10:21:04 +05:30
Omkar Prabhu
2fd2412b20 integrated lb client in ipfs-cluster-ctl 2020-10-04 16:36:58 +05:30
Omkar Prabhu
ac21fde762 fix #1184: adds pin update options in ipfs-cluster-ctl 2020-07-21 16:49:27 +05:30
@RubenKelevra
d2a83e45f1
help text: fix copy and paste error in pin update --ns (#1183) 2020-07-01 13:10:23 +02:00
@RubenKelevra
1d98410745
fix typo (#1181) 2020-07-01 12:34:59 +02:00
Hector Sanjuan
1806273f2f
Set development version v0.13.0-next 2020-05-19 10:10:08 +02:00
Hector Sanjuan
f213fe3dfa
Set development version v0.13.0-dev 2020-05-19 10:08:09 +02:00
Hector Sanjuan
6b25d6fd3e
Release 0.13.0 2020-05-18 23:21:54 +02:00
Hector Sanjuan
f45118ff1d
Release 0.13.0-rc1 2020-05-16 02:31:49 +02:00
Hector Sanjuan
e967238848
Merge pull request #1129 from ipfs/fix/1013-follow-list
Improvements to ipfs-cluster-follow * list
2020-05-16 02:31:06 +02:00
Hector Sanjuan
c026299b95 Include Name as GlobalPinInfo key and consolidate redundant keys
GlobalPinInfo objects carried redundant information (Cid, Peer) that takes
space and time to serialize.

This has been addressed by having GlobalPinInfo embed PinInfoShort rather than
PinInfo. This new types ommits redundant fields.
2020-05-16 02:27:24 +02:00
Hector Sanjuan
4a0c8195eb ipfs-cluster-ctl: print pin name on status 2020-05-15 02:13:43 +02:00
Kishan Mohanbhai Sagathiya
ae8e74453b Fix #937: Print full working configuration at startup
Only when using debug mode

Co-authored-by: Hector Sanjuan <code@hector.link>
2020-05-15 01:33:04 +02:00
Hector Sanjuan
7378183b36 Speed up and improve "ipfs-cluster-follow * list"
For the online case we were unnecessarily loading the configuration from IPFS, a very
slow operation if IPFS is very busy (when syncing).

For the offline case, we required IPFS to be online (for remote
configurations) slow things down as well and is uncovenient. Instead, simply
open the database with default parameters and list it.
2020-05-15 01:08:30 +02:00
Hector Sanjuan
7e9cece29c Include pin Names in PinInfo objects
Fixes #1013 by avoiding to have to make a specific request to allocations.
2020-05-15 00:18:14 +02:00
Hector Sanjuan
68db5027e1 Fix #1009: Add Mode={direct,recursive} PinOption
This adds a new pin option: Mode that can be set to "direct" or "recursive".

The Mode is used to set the MaxDepth Pin field accordingly. When set to 0, we
will call pin/add using the type=direct.
2020-04-21 17:23:55 +02:00
Hector Sanjuan
717ed85823 gofmt -s fixes 2020-04-14 23:44:18 +02:00
Hector Sanjuan
7ffd18e41b Feat: upgrade to dual DHT 2020-04-14 22:03:24 +02:00