Adam Harrison
2eeb754454
refactor: Introduce IPAM config object
2016-03-14 17:41:20 +00:00
Bryan Boreham
a57335738d
Don't do unnecessary clock skew check in IPAM
2016-03-10 11:41:47 +00:00
Adam Harrison
6584df274e
Implement weave consense
2016-03-03 18:52:09 +00:00
Adam Harrison
b84ef98de8
Support non-electing peers via --observer
2016-03-03 17:48:50 +00:00
Bryan Boreham
73f1a04d5f
Deal in subnets, not ranges, when requesting address allocation
2016-03-02 17:21:51 -08:00
Bryan Boreham
b76e2a87cf
Store address+subnet prefix for 'owned' addresses
2016-03-02 17:21:24 -08:00
Bryan Boreham
b6eec08247
Return all applicable results from Lookup
...
and stop erroring on Lookup not found; just return a blank result
2016-03-02 17:01:12 -08:00
Bryan Boreham
95cbc8940e
Sync 'owned' data with existing containers at startup
2016-03-02 11:35:24 -08:00
Bryan Boreham
f29716387f
Persist the 'owned' address set
2016-03-02 11:35:24 -08:00
Bryan Boreham
7453c7a5dd
Merge branch '1.4'
2016-02-29 08:22:22 -08:00
Adam Harrison
bceabe32a2
Try all pending allocations
...
We can have outstanding allocations for different ranges owned by
different peers, so we should not short circuit after the first space
request.
2016-02-25 14:56:33 +00:00
Bryan Boreham
546f9592f9
Hard-fail on persistence errors, otherwise the network can get confused on a restart.
...
Create `Allocator.fatalf()`, for consistency
2016-02-12 18:12:26 +00:00
Bryan Boreham
06f3793f05
Remove persisted IPAM ring data on peerName change
2016-02-12 18:12:26 +00:00
Bryan Boreham
f396c60402
Persist the Ring
2016-02-12 18:12:26 +00:00
Bryan Boreham
ad036499eb
Add db infra to IPAM
2016-02-12 18:12:26 +00:00
Bryan Boreham
07b79568dd
Resurrect apparently-dead containers on ContainerStarted event
2016-02-04 13:49:43 +00:00
Matthias Radestock
6bebce0b5a
tiny refactor
2016-02-02 14:03:01 +00:00
Bryan Boreham
71da517e88
Refactor to collect all code that touches alloc.owned
2016-02-02 13:57:12 +00:00
Bryan Boreham
952e9de265
Remove superfluous line and fix comment typo
2016-01-25 18:05:43 +00:00
Peter Bourgon
e27b320ede
Update import location for mesh
2016-01-15 15:57:01 +01:00
Bryan Boreham
e468399616
Extend the timeout for dead containers to 30 seconds,
...
but remove them if they are destroyed, to reduce starvation
when users are creating and destroying containers quickly.
2016-01-12 14:38:44 +00:00
Bryan Boreham
b2b293a8ee
Added 'ContainerDestroyed()' callback from docker client
2016-01-12 14:38:44 +00:00
Bryan Boreham
f84b933d7c
Leave container allocations for a time after death
...
so they will be reclaimed if the container is restarted.
Still cancel pending operations immediately a container dies
2016-01-12 14:38:44 +00:00
Bryan Boreham
4672e9ec1f
Generalise ticker so we can use it for more than paxos,
...
and call tryPendingOps() from it so we eventually re-try operations
2016-01-12 14:38:44 +00:00
Matthias Radestock
274265f001
typo
2015-12-21 17:03:03 +00:00
Matthias Radestock
3cd199e852
make GossipData immutable
...
The same piece of GossipData can be shared and subject to different
Merge operations. We either need to copy the data when we share it, or
create copies on modification, i.e. copy-on-write.
We choose the latter, since it is more efficient and there is just one
mutating operation.
Fixes #1697 .
2015-11-17 20:13:46 +00:00
Matthias Radestock
dc9f8762ca
move generic communication substrate into its own 'mesh' package
...
This is mostly a matter of moving some files, changing package names,
changing some imports, and changing some type references.
We duplicate the odd constant & global var, and the intmac/macint
functions, since neither 'router' or 'mesh' nor, really,' common' are
a natural home for them.
2015-11-09 16:37:39 +00:00
Matthias Radestock
8bd77c0d47
refactor: get rid of router/utils.go
...
most functions end up in other files in the router package, but a few
land in common.
2015-11-07 15:45:29 +00:00
Bryan Boreham
67e9310cc1
Review feedback
2015-11-03 17:01:27 +00:00
Bryan Boreham
8742957f75
Tweak naming to be closer to code changes in nameserver
2015-11-03 14:15:49 +00:00
Bryan Boreham
ace372cfc6
More extensive choice of transferee
2015-11-03 12:03:28 +00:00
Bryan Boreham
b3cda39b0b
Let IPAM pick any peer we know about to transfer ownership to, when shutting down
2015-11-02 18:34:58 +00:00
Tom Wilkie
33085e3798
Merge pull request #1499 from weaveworks/1463-ipam-seed-mismatch
...
detect when IPAM has been seeded by different peers
2015-10-09 14:46:55 +01:00
Matthias Radestock
751ccd02f6
don't stall in ipam on early container death
...
When a container died before we got into the allocation code (inside
the allocator run loop) we would not cancel the allocation since the
container death event will have been processed by the allocator before
it had any knowledge of the container.
The fix is to move the container-aliveness check inside the allocation
code. That way we still detect the death even if the event has already
flown past.
We only need to perform the check once, since any subsequent death
will result in an event that is processed by the allocator when it has
recorded the container in its state.
Fixes #1459 .
2015-10-07 15:20:22 +01:00
Matthias Radestock
8aaf4cfaf0
include nicknames in error message, if we have them
2015-10-06 14:41:41 +01:00
Matthias Radestock
5a45471c68
more readable errors on ring.Merge
...
There are three significant changes here:
- rewrite ring.ErrDifferentSeeds errors
- remove the pre-checking of ranges and instead rewrite
ring.ErrDifferentRange errors
- don't pruneNicknames() and signal ringUpdated() when there was an
error
We don't rewrite other errors since our current belief is that only
ErrDifferentSeeds and ErrDifferentRange can arise from user error.
2015-10-06 14:20:42 +01:00
Matthias Radestock
0bdc84d42a
Merge branch '1.1'
2015-09-22 16:28:05 +01:00
Matthias Radestock
7f74ae7912
Merge pull request #1426 from weaveworks/1418-clean-cancel
...
Handle cancelled allocation in 'weave attach'
Fixes #1418 .
2015-09-22 16:27:27 +01:00
Bryan Boreham
98b80c59d9
Detect cancelled allocation more cleanly
...
to avoid the weave script trying to parse an error message as a CIDR
2015-09-16 14:14:40 +01:00
Matthias Radestock
14dde9ec32
Merge branch '1.1'
2015-09-15 16:47:05 +01:00
Bryan Boreham
d55c68c248
Review feedback
2015-09-15 16:18:37 +01:00
Bryan Boreham
a7e0f03647
Use explicit index into operations slice in cancelOpsFor()
...
to avoid mis-indexing when more than one op is removed
2015-09-14 17:02:35 +01:00
Bryan Boreham
81e8ba223f
Do network attach on docker event rather than intercepting start and restart commands.
...
This means it also works when the docker daemon restarts a container.
2015-09-01 17:48:12 +01:00
Adam Harrison
fc9a1c8664
new weave status, weave status ..., and weave report
2015-08-11 12:15:13 +01:00
Matthias Radestock
77358140d9
Merge pull request #1219 from squaremo/driveby
...
Remove misleading comment and lowercase deniedBy
2015-07-28 18:09:01 +01:00
Tom Wilkie
da7ac78694
Don't try and init the ring if the IP address is not in our range.
2015-07-28 14:12:42 +00:00
Michael Bridgen
c88361473c
Remove misleading comment and lowercase deniedBy
...
* the comment "don't make the caller wait" applies to both branches
of that if clause, and having it on one branch implies the other
does make the caller wait
* there's no reason for DeniedBy to start with a capital: it's a
method on a private struct and it's not part of an interface.
2015-07-27 16:22:32 +01:00
Bryan Boreham
f0915221d1
Rename 'reclaim' to 'noErrorUnknown' which describes the behaviour better
2015-07-23 20:16:30 +01:00
Bryan Boreham
647b755b64
Check manually-assigned addresses with IPAM to see if they clash
2015-07-21 17:02:52 +01:00
Tom Wilkie
25c9180fdf
Don't swallow errors in the docker client.
2015-07-17 12:35:12 +00:00