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
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
Bryan Boreham
1beaf79e47
Refactor: extract duplicated code into helper functions
2015-09-16 14:14:30 +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
Matthias Radestock
f399c3a888
Merge branch '1.0'
...
Conflicts:
ipam/ring/ring_test.go
2015-08-20 16:32:09 +01:00
Bryan Boreham
135c34a45a
Don't remove peer from table until after we've copied its entries out
2015-08-20 13:11:51 +01:00
Bryan Boreham
ca6e54890c
Fix Transfer() when removing a peer, so we actually target the other peer.
2015-08-20 13:11:51 +01:00
Tom Wilkie
790a1757e0
Revert "In ipam ring unit test, check if we have any peers with entries to avoid crash "
2015-08-20 12:18:34 +01:00
Bryan Boreham
df5426dd8b
Check if we have any peers with entries, to avoid crash
2015-08-20 11:57:56 +01:00
Adam Harrison
fc9a1c8664
new weave status, weave status ..., and weave report
2015-08-11 12:15:13 +01:00
Tom Wilkie
4df3d7f150
Reduce the amount of parallelism in the ipam tests
2015-07-29 10:13:02 +00: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
Michael Bridgen
5389e31190
Merge branch '687-detect-ipam-clash' of github.com:weaveworks/weave into pr1200
2015-07-27 11:54:31 +01:00
Bryan Boreham
f0915221d1
Rename 'reclaim' to 'noErrorUnknown' which describes the behaviour better
2015-07-23 20:16:30 +01:00
Tom Wilkie
a12d63bb12
Make ipam test less stressful, so it doesn't timeout.
2015-07-22 12:53:27 +00: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
Matthias Radestock
358ae3a936
Merge pull request #1174 from weaveworks/1128-iprange-error
...
More helpful error message when --ip-alloc-range mismatched
Closes #1128 .
2015-07-17 12:35:20 +01:00
Bryan Boreham
2dbf83889b
Remove unused error messages
2015-07-17 12:19:54 +01:00
Bryan Boreham
9b2c5b8466
Improve description of merge error
2015-07-17 12:19:33 +01:00
Bryan Boreham
1f4b943454
More helpful error message when --ip-alloc-range mismatched
2015-07-17 11:42:30 +01:00
Bryan Boreham
f4d6e028d4
Simplify
2015-07-17 11:33:29 +01:00
Bryan Boreham
4c5920a50a
Add fuzz-test for Claim
2015-07-16 16:12:23 +01:00
Bryan Boreham
c3c40b15f1
Avoid hanging the caller when we try to claim from a dead peer
2015-07-16 16:12:23 +01:00
Bryan Boreham
af7ca99dc4
Extend unit-tests for claim operation
2015-07-16 16:12:23 +01:00
Bryan Boreham
2d224d423d
Add SpaceRequestDenied message
2015-07-16 16:12:23 +01:00
Bryan Boreham
e7088e5daf
Extract decodeRange function
2015-07-16 16:12:23 +01:00
Bryan Boreham
d65409e97e
Improve comment & log for deferred claim
2015-07-16 16:12:23 +01:00
Bryan Boreham
b3979c9505
Respond to paxos message if we already have a ring
2015-07-15 13:05:25 +01:00
Bryan Boreham
273a0fba47
Add sender to mock broadcast messages
2015-07-15 13:05:25 +01:00
Bryan Boreham
acf13dc157
Add sender to OnGossipBroadcast()
2015-07-15 12:07:56 +01:00
Matthias Radestock
2b61bc91df
cosmetic: remove blank log lines
2015-07-11 16:43:33 +01:00
Matthias Radestock
982c9d7650
remove dead code
2015-07-11 11:17:44 +01:00
Matthias Radestock
76943f0b17
cosmetic
2015-07-11 02:52:30 +01:00
Matthias Radestock
c4f516655d
refactor: simplify ipam claim try
2015-07-11 02:28:14 +01:00
Adam Harrison
da41604229
Fix IPAM test compilation
2015-07-10 15:43:28 +01:00
Adam Harrison
d5a4326b9e
Merge branch '1.0'
...
Conflicts:
ipam/allocator_test.go
ipam/claim.go
2015-07-10 14:35:41 +01:00
Bryan Boreham
cf4ce0a07d
Don't cancel address claim when caller closes socket
2015-07-09 10:47:34 +01:00
Bryan Boreham
78c4b06492
Don't wait for certainty before responding to Claim
...
Conflicts:
ipam/claim.go
2015-07-09 10:47:27 +01:00
Tom Wilkie
89ad7e1ba2
Move test gossip router out of ipam code for use in gossip dns code.
2015-07-08 15:03:13 +00:00
Alvaro
33921c2cfe
Merge pull request #1073 from weaveworks/971_check_container_alive_in_api
...
make container aliveness check part of the ipam & dns API
2015-07-07 16:08:40 +02:00
Tom Wilkie
4fdb14293b
Move ipam/address to net/address
2015-07-07 10:33:20 +00:00
Matthias Radestock
6596c8b1a7
make container aliveness check part of the ipam & dns API
...
...rather than conducting it implicitly when an ID "looks like" a
container ID.
Closes #971
2015-07-04 19:13:13 +01:00