Commit Graph

1128 Commits

Author SHA1 Message Date
Hector Sanjuan
7540e7b056 Leave on shutdown: only attempt when cluster reached ready state.
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-01 12:17:33 +01:00
Hector Sanjuan
7df2277684 Consensus: only log pins committed on the leader.
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-01 12:17:33 +01:00
Hector Sanjuan
09e9b05ed0 Peer add: do not print "new peer" info messages on boot
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-01 12:17:33 +01:00
Hector Sanjuan
d21cc2b32f Issue #213: Always wait for configuration to be saved
Even when cluster dies

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-01 12:17:33 +01:00
Hector Sanjuan
18dbf1a93b Issue #131: Do not abort on bad peerset
Print warning instead.

Shutdown raft on peerRm.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-01 12:17:33 +01:00
Hector Sanjuan
b7ed9e5c25 Issue #131: Be more verbose when raft initialization fails
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-01 12:17:33 +01:00
Hector Sanjuan
7bfb3c45d7 Issue #131: Remove some left-over logging
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-01 12:17:33 +01:00
Hector Sanjuan
0980a5de70 Issue #131: Do not crash when shutting down after consensus start error
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-01 12:17:33 +01:00
Hector Sanjuan
848023e381 Fix #139: Update cluster to Raft 1.0.0
The main differences is that the new version of Raft is more strict
about starting raft peers which already contain configurations.

For a start, cluster will fail to start if the configured cluster
peers are different from the Raft peers. The user will have to
manually cleanup Raft (TODO: an ipfs-cluster-service command for it).

Additionally, this commit adds extra options to the consensus/raft
configuration section, adds tests and improves existing ones and
improves certain code sections.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-01 12:17:33 +01:00
Hector Sanjuan
71a37e8303
Merge pull request #217 from ipfs/fix/216-docker
Fix #216: Docker does not like an env variable in CMD (anymore?)
2017-10-31 11:55:51 +01:00
Hector Sanjuan
fb7be4137f Fix #216: Docker does not like an env variable in CMD (anymore?)
This used to work. Even if it's been surfaced by 4a8759939 we were
extensively testing the Dockerfile before that release.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-31 11:46:32 +01:00
Hector Sanjuan
e51f771391
Merge pull request #214 from ipfs/fix/213-save
Issue #213: Fix save in cluster component config
2017-10-27 23:46:03 +02:00
Hector Sanjuan
746ce00d31 Issue #213: Peer addresses should never be a nil slice
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-27 22:11:14 +02:00
Hector Sanjuan
828236dcc0 Issue #213: Make sure we wait for configuration to be saved
There might be a case where the program is terminated before
configuration is saved.

Also, avoid calling save() multiple times on shutdowns.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-27 21:44:02 +02:00
Hector Sanjuan
849581681a Issue #213: Fix save in cluster component config
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-27 20:22:14 +02:00
Hector Sanjuan
073848257a gx publish 0.2.1
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 17:01:22 +02:00
Hector Sanjuan
f5e5ed1e6e Release 0.2.1
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 17:01:04 +02:00
Hector Sanjuan
094f725605 Merge pull request #207 from ipfs/0.2.1/changelog
0.2.1/changelog
2017-10-26 17:00:52 +02:00
Hector Sanjuan
7ee9742feb Changelog for v0.2.1
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 16:48:12 +02:00
Hector Sanjuan
4c315bec9b Merge pull request #205 from ipfs/fix/202-32-bit
Fix #202: Fix informers and allocators for 32-bit architectures
2017-10-26 16:47:17 +02:00
Hector Sanjuan
b392d28884 Merge pull request #209 from ipfs/fix/208-repl-factor
Fix #208: Set replication factor from loaded json
2017-10-26 16:38:12 +02:00
Hector Sanjuan
64dfaa2efd Fix #208: Set replication factor from loaded json
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 16:14:19 +02:00
Hector Sanjuan
5831b251fe Issue #202: Fix mock informer
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 16:01:41 +02:00
Hector Sanjuan
5fb0753aed Issue #202: Make sure the ipfs mock repo/stat endpoint behaves like ipfs
This should fix tests.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 16:01:41 +02:00
Hector Sanjuan
4ddf57cee4 Issue #202: Fix mock connector in tests to provide uint64s
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 16:01:41 +02:00
Hector Sanjuan
00e871ddec Fix #202: Fix informers and allocators for 32-bit architectures 2017-10-26 16:01:41 +02:00
Hector Sanjuan
3c48c35920 Merge pull request #204 from ipfs/fix/203-peers-ignored
Fix #203: Assign peers and bootstrap when parsing the configuration
2017-10-26 15:29:14 +02:00
Hector Sanjuan
289ac77cf6 Issue #203: Add test for the issue
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 13:56:31 +02:00
Hector Sanjuan
af091cc51b Fix #203: Assign peers and bootstrap when parsing the configuration
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 13:42:43 +02:00
Hector Sanjuan
f002dd10b2 Merge pull request #196 from ipfs/fix/194-same-binary
Fix #194: Same binary in dockerfile
2017-10-25 16:16:10 +02:00
Hector Sanjuan
7c42b1af13 Fix #194: Same binary in dockerfile 2017-10-25 16:15:45 +02:00
Hector Sanjuan
934714b0ba gx publish 0.2.0
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-23 19:40:45 +02:00
Hector Sanjuan
7c5f40babf Release 0.2.0
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-23 19:39:37 +02:00
ZenGround0
98ce13dd73 Merge pull request #188 from ipfs/fix/dockerfile-again
Dockerfile-test: Add bash to busybox
2017-10-23 11:38:17 -04:00
Hector Sanjuan
d68ea1fe07 Merge pull request #187 from ipfs/0.2.0/changelog
Add changelog for v0.2.0
2017-10-23 12:57:31 +02:00
Hector Sanjuan
8ed16327ac Delay changelog entry to today
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-23 12:52:02 +02:00
Hector Sanjuan
caafe3d18d Merge branch 'captain-log-update-2' 2017-10-23 12:51:03 +02:00
Hector Sanjuan
38095afa39 Delay entry to today
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-23 12:50:44 +02:00
Hector Sanjuan
47c877fa13 Dockerfile-test: Add bash to busybox
Remove the debian-stretch Dockerfile-test and put the busybox one
with bash in its place.

Tested that kubernetes-ipfs runs with it.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-21 11:52:25 +02:00
Hector Sanjuan
12c85ab6eb Merge pull request #185 from ipfs/fix/154-dockerfile
Fix #154: Update Dockerfiles
2017-10-21 00:46:25 +02:00
Hector Sanjuan
0e26d92513 Add new Dockerfile-test using busybox (experimental)
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-21 00:12:23 +02:00
Hector Sanjuan
a57ee29e10 Use plain debian for Dockerfile-test
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-21 00:12:08 +02:00
Hector Sanjuan
fe815bb9dc Use sh for docker test scripts
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-21 00:11:47 +02:00
Hector Sanjuan
f1e5c393c8 Allow secrets to be nil (no secret)
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 23:44:18 +02:00
Hector Sanjuan
1d256166d6 Fix #154: Update Dockerfiles
After changes on how the final docker image for go-ipfs is generated,
our Dockerfiles failed to build.

The new version is inspired on go-ipfs Dockerfile. It takes advantage
of docker >= v17.06 which allows multi-stage Dockerfiles with
several FROM directives and COPY --from. This allows build freely on a
first stage, without thinking of cleaning up, and then just copy the
final artifacts to a second, minimal image.

The Dockerfile-test is similarly updated. Minor changes have been
applied to the entrypoints.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 20:51:19 +02:00
ZenGround0
4a87599399 Merge pull request #186 from ipfs/fix/bad-subcommand
ipfs-cluster-service: Do not run with unknown subcommands
2017-10-20 13:53:32 -04:00
Hector Sanjuan
eca012b9fe ipfs-cluster-service: Do not run with unknown subcommands
Shows an error when running cluster with an unknown subcommand.

Renames "ipfs-cluster-service run" to "ipfs-cluster-service daemon" which
is consistent with go-ipfs and paves ground for #153.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 18:57:15 +02:00
ZenGround0
03b21bf97d Merge pull request #177 from ipfs/162-new-configs
Issue #162: Rework configuration format
2017-10-20 09:29:33 -04:00
Hector Sanjuan
7496b19525 CAPTAIN.LOG.md update for v0.2.0
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 13:15:27 +02:00
Hector Sanjuan
10ffa5ced5 Add changelog for v0.2.0
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 13:12:25 +02:00