Commit Graph

1019 Commits

Author SHA1 Message Date
Hector Sanjuan
11117e5a74 Merge branch '0.3.2/changelog' 2018-01-26 10:28:50 +01:00
Hector Sanjuan
e7048568b8
Merge pull request #303 from ipfs/fix/move-index-up
Fix/297
2018-01-26 10:21:43 +01:00
Hector Sanjuan
4d26550e5c Address comments
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-25 23:34:06 +01:00
Wyatt Daviau
eafc747305 fix/297 Resolve the lack of snapshot pushes:
Snapshot saving state commands (upgrade and import)
now save raft config peers as consensus peers in snapshot.
Snapshot index 1 -> 2 when saving from a fresh import to force
replication when bootstrapping.

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-25 16:47:12 -05:00
Hector Sanjuan
21e05f1a49 Captain's log update
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-25 13:03:15 +01:00
Hector Sanjuan
17071540fe Changelog: 0.3.2
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-25 13:02:57 +01:00
Hector Sanjuan
f4c57d8581 Tests: make api/rest/client bind on random port
For jenkins

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-25 12:54:55 +01:00
Hector Sanjuan
8193f7334a Tests: make rest api test bind on random port
For jenkins

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-25 12:09:46 +01:00
Hector Sanjuan
67e505964e Tests: make ipfshttp connector tests bind on random port
For jenkins

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-24 20:17:42 +01:00
Hector Sanjuan
41149348a8 Tests: Make raft tests bind on random port
For jenkins

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-24 20:17:32 +01:00
Hector Sanjuan
ddb5da18c9 Tests: Bind testing clusters on random port
Jenkins likes this very much.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-24 20:16:55 +01:00
Hector Sanjuan
144729e149
Merge pull request #301 from ipfs/fix/297-state-unmarshal
Fix #297: State unmarshal
2018-01-24 19:55:47 +01:00
Hector Sanjuan
f94faa2ebb Fix #297: State unmarshal
It seems we have problems deserializing on top of an already
initialized state.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-24 16:52:43 +01:00
ZenGround0
4b26ccd144
Merge branch 'master' into feat/connectivity-graph 2018-01-23 08:34:43 -05:00
Wyatt Daviau
78f14b6d2a addressing more comments
License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-23 08:33:12 -05:00
Wyatt Daviau
d2ef32f48f Testing and polishing connection graph
Added go tests
Refactored cluster connect graph to new file
Refactored dot file printing to new repo
Fixed code climate issues
Added sharness test

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-22 10:03:37 -05:00
Wyatt
e712c87570 First draft of ConnectGraph collection:
added ConnectGraph type and serialization
added cli command hitting cluster api
added cluster api client method + endpoint calling into rpc
added rpc calling into main cluster component
added clustercomponent's function to collect ConnectGraph
added functionality in ipfsconn to retrieve ipfs swarm peers
added dot file printing given ConnectGraphSerial

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-22 09:07:12 -05:00
Hector Sanjuan
8e487cd880
Merge pull request #292 from ipfs/feat/277-min-max-repl-factor
Fix #277: Introduce maximum and minimum replication factor
2018-01-22 10:54:09 +01:00
Hector Sanjuan
4b6ee706e7 Fix #222: Fix overpinning or underpinning of pins after rejoin
The StateSync() function did not take into account that the maptracker
may think that some pinned items are local/remote when they
should not be. In those cases, it needs to trigger re-tracks.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-19 22:24:03 +01:00
Hector Sanjuan
dcfc962f24 Feat #277: Address review comments
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-19 22:24:03 +01:00
Hector Sanjuan
20705eaa09 Feat #277: Update docs
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-19 22:24:03 +01:00
Hector Sanjuan
f2efcc3f10 Codeclimate: increase thresholds again. They're too low for Go.
In go it doesn't matter if function returns 20 times. We need to do
a lot of error checking and that's how it should be.

Each of those error checks are 3 lines of code
so it also doesn't matter if functions are a bit longer.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-19 22:24:03 +01:00
Hector Sanjuan
a1ab106fcc Feat #277: Improve getCurretPin() call
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-19 22:24:03 +01:00
Hector Sanjuan
ae1afe3af8 Feat #277: Avoid re-pinning log entries when the new pin is the same
This ensures that we don't re-pin something which is already correctly
pinned with the same allocations.

It also ensures that we do re-pin something when the replication
factor associated to it changes.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-19 22:24:03 +01:00
Hector Sanjuan
b013850f94 Fear #277: Add test about wanted < 0
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-19 22:24:03 +01:00
Hector Sanjuan
b12138f7ff Fix #277: Add support for replication-min and replication-max in ctl
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-19 22:23:34 +01:00
Hector Sanjuan
3c4b2ae27e Fix #277: Add tests for replication_min/max
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-16 16:36:06 +01:00
Hector Sanjuan
5f45ba8bce Fix #277: Add min a max replication factor to rest API
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-16 16:36:06 +01:00
Hector Sanjuan
4549282cba Fix #277: Introduce maximum and minimum replication factor
This PR replaces ReplicationFactor with ReplicationFactorMax
and ReplicationFactor min.

This allows a CID to be pinned even though the desired
replication factor (max) is not reached, and prevents triggering
re-pinnings when the replication factor has not crossed the
lower threshold (min).

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-16 16:36:06 +01:00
Hector Sanjuan
7ea011f35a
Merge pull request #290 from ipfs/fix/240-logging
Fix #240: Avoid duplicated list of facilities
2018-01-16 15:10:50 +01:00
Hector Sanjuan
bfdd59735c Fix #240: Add test flags. Remove build tags for logging control.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-16 09:28:40 +01:00
Hector Sanjuan
e596c09298
Merge pull request #293 from ipfs/fix/validate-state
Fix: validateState does not detect different state versions
2018-01-16 08:41:24 +01:00
Hector Sanjuan
5b3be2df7f Fix: validateState does not detect different state versions
It was comparing state.GetVersion() against state.Version, which
is the same, instead of against, mapstate.Version, which is the
constant for the current Version.

It was also returning a nil error, as the scope of the variable
assigned was not that of the outer level.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-15 20:03:14 +01:00
Hector Sanjuan
2a6f91cd35 Fix #240: Avoid duplicated list of facilities
This puts some sanity in this. It's not super correct (name of facilities
depend of the component and the main cluster component should not hard
code them), but it's clear enough. Imho, better than over-engineering
a more elegant approach.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-15 16:50:40 +01:00
ZenGround0
b8014927f6
Merge pull request #256 from ipfs/feat/try-jenkins
Adding Jenkinsfile -- Experiment
2018-01-12 18:17:00 -05:00
Wyatt
fc237b21d4 Feat: Enable Jenkins builds
This enables support for testing in jenkins.

Several minor adjustments have been performed to improve the probability
that the tests pass, but there are still some random
problems appearing with libp2p conections not becoming available or
stopping working (similar to travis, but perhaps more often).

MacOS and Windows builds are broken in worse ways (those issues will
need to be addressed in the future).

Thanks to @zenground0 and @victorbjelkholm for support!

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-11 18:11:46 +01:00
ZenGround0
a4d8aac68c
Merge pull request #288 from ipfs/fix/sharness
Harden Sharness
2018-01-10 14:32:09 -05:00
ZenGround0
20442ec406
Merge pull request #268 from ipfs/doc/dag-sharding-rfc
ipfs-cluster dag/file sharding RFC WIP
2018-01-10 13:08:26 -05:00
Wyatt Daviau
ef39203dfa Dag-sharding rfc
This commit adds the dag-sharding-rfc file to the docs directory.
This file outlines the DAG sharding project and currently contains
the draft posted to ipfs/notes for feedback.  As suggestions are
incorporated this document will be reworked to track the consensus
on the project's goals and implementation.

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-10 13:06:11 -05:00
Hector Sanjuan
8daf54f8f4 New credentials for pushing snaps
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-10 18:33:33 +01:00
Wyatt Daviau
a99b403273 Sharness hardening:
Better error messages in test-lib init functions and ipfshttp
Cleanup functions are now called after every test file

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-09 14:17:21 -05:00
Hector Sanjuan
bda2674c4b
Merge pull request #285 from ipfs/fix/snapshot-wait-for-index
Fix #275: Attempt to wait for updates when shutting down
2018-01-09 15:39:37 +01:00
Hector Sanjuan
89b8fe106e Fix #275: Wait for Raft updates before snapshotting on shutdown
Raft will fail to take a snapshot when applied index is
different from the last index. Therefore, we wait for
all updates to be aplied before snapshotting.

If still it doesn't work, we retry a few times.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-09 15:02:47 +01:00
ZenGround0
abebe498cb
Merge pull request #282 from ipfs/feat/docker-test
fix/basic-docker-tests
2018-01-05 08:13:19 -05:00
Wyatt Daviau
66606a98c9 Tweaking wait time
License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-05 07:45:41 -05:00
Hector Sanjuan
0c395e6156
Merge branch 'master' into feat/docker-test 2018-01-05 10:39:15 +01:00
Hector Sanjuan
6d299f9848
Merge pull request #283 from ipfs/feat/migration-framework
Generalize migration process
2018-01-05 10:33:50 +01:00
Wyatt Daviau
652ba567a2 More general migration framework in place
License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-04 23:07:52 -05:00
Wyatt Daviau
79bc8caddf Bring sleep times within reason
License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-04 16:51:50 -05:00
Wyatt Daviau
c2c3d6c992 Adjusting timeout to see if that helps
License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-04 16:04:06 -05:00