Bryan Boreham
fd5ac633d3
Use weave attach --or-die in proxy instead of killing it in the proxy.
2015-06-16 16:05:41 +01:00
Bryan Boreham
ee4daf02b5
Introduce ipam_cidrs_or_die, and call it where we don't want the
...
container to survive an ipam failure.
2015-06-16 15:27:49 +01:00
Bryan Boreham
32d3909023
Make ipam_cidrs() return failure when call_weave fails
2015-06-16 14:47:47 +01:00
Bryan Boreham
9a99a51e14
Merge pull request #925 from bboreham/922-remove-dot
...
Remove trailing dot from hostnames. Fixes #922 .
2015-06-16 13:58:12 +01:00
Bryan Boreham
7a106aeb5f
Release lock before sending on a channel
2015-06-16 11:44:25 +01:00
Bryan Boreham
79db00a90e
Strip trailing period from hostname generated from weavedns domain.
...
We strip at the calling point rather than in the server, because DNS
servers do see the domain as ending with a '.' representing the root.
2015-06-16 10:26:11 +01:00
Bryan Boreham
dd9adf6a65
Don't add a trailing newline to the domain
2015-06-16 10:25:54 +01:00
Bryan Boreham
56e0636b14
Output error message if http call to weave or weavedns fails
2015-06-15 17:58:59 +01:00
Bryan Boreham
6534cc6ae3
Merge pull request #919 from bboreham/915-not-again-again
...
Fixes #915
2015-06-15 17:06:30 +01:00
Bryan Boreham
d25d0810af
Extend the 'block' flag to block allocateAgain()
...
otherwise we can re-insert the entry into the map after a parallel
allocateAgain() has cleared the flag. And it /that/ happens in
parallel with a free() then the data-structure can get out of sync.
2015-06-15 16:51:27 +01:00
Bryan Boreham
7e6a478283
Merge pull request #914 from rade/911_different_gossip_channels
...
LGTM. Fixes #911
2015-06-15 14:42:22 +01:00
Bryan Boreham
0ff311356d
Flush the background updater goroutines to make tests reliable
2015-06-15 13:48:54 +01:00
Bryan Boreham
e49a29197b
Add a Flush() routine to synchronize callers
2015-06-15 13:48:24 +01:00
Bryan Boreham
2b7fb699af
Clean up a couple of compilation errors
2015-06-15 13:47:01 +01:00
Bryan Boreham
f3ad8bd52f
Merge branch 'weave-fix-unittest' of https://github.com/inercia/weave into inercia-weave-fix-unittest
2015-06-15 11:51:14 +01:00
Bryan Boreham
4c01af4e1d
Check if container is still running right after allocating
2015-06-12 17:09:11 +01:00
Bryan Boreham
13944f3811
Refactor is-running check so we can re-use more of the code
2015-06-12 17:09:11 +01:00
Bryan Boreham
5aafbbeff0
Fix compile error introduced in merge of #904
2015-06-12 16:20:35 +01:00
Bryan Boreham
12de13c678
Use /10 instead of /9 for default iprange, so it doesn't clash with CircleCI address
2015-06-12 15:15:36 +01:00
Bryan Boreham
7941612dad
remove one level of indentation
2015-06-12 15:01:06 +01:00
Bryan Boreham
799e202d6d
Make error message more readable
2015-06-12 14:52:20 +01:00
Bryan Boreham
658fbac7aa
Keep flushing gossip until it's all gone
...
A better (i.e. working?) fix for #885 .
2015-06-12 14:50:37 +01:00
Bryan Boreham
086daca3d0
Fold communication-checking code into docker.Client.NewClient()
2015-06-12 14:45:29 +01:00
Bryan Boreham
29c988d42f
Merge pull request #900 from rade/762_dns_ipam
...
LGTM. Closes #762 .
2015-06-12 14:21:07 +01:00
Bryan Boreham
404ae010e4
Improve flow of IPAM doc
2015-06-11 18:35:18 +01:00
Bryan Boreham
43d42e6f15
Update docs for default -iprange
2015-06-11 18:01:28 +01:00
Bryan Boreham
328e63828e
Check whether netcheck exists before relying on it
2015-06-11 17:55:27 +01:00
Bryan Boreham
465b16e668
Give -iprange a default, and check if it is free
2015-06-11 17:34:43 +01:00
Bryan Boreham
0e6569d78c
New program netcheck to check if network overlaps routes
2015-06-11 17:27:20 +01:00
Bryan Boreham
8285046962
Function to check if a network overlaps with existing routes
2015-06-11 17:27:20 +01:00
Bryan Boreham
a89b549c40
Change command-line syntax to net: prefix instead of --subnet
2015-06-10 17:28:06 +01:00
Bryan Boreham
91ad3ef684
Illustrate mix-and-match of ipam and non-ipam CIDRs on command-line
2015-06-10 17:27:07 +01:00
Bryan Boreham
36f793c1f4
Delete entry from addresses map when slice is empty
2015-06-10 17:27:07 +01:00
Bryan Boreham
c27cd5b4ab
Extract lookup function for owned addresses
2015-06-10 17:27:07 +01:00
Bryan Boreham
7d881a0f0c
Check that weave ps returns exactly the CIDRs we are looking for, and comment assumption
2015-06-10 17:27:07 +01:00
Bryan Boreham
487bd2eaf7
Use zero-cidr-args form of 'weave detach' to test #862
2015-06-10 17:24:36 +01:00
Bryan Boreham
e9d194327a
Reduce level of noise in debug logs from containers dying
2015-06-10 17:24:36 +01:00
Bryan Boreham
c301e6a380
Expand test to use IPAM and check addresses are freed
2015-06-10 17:24:36 +01:00
Bryan Boreham
a3d73be8b8
General tidying
...
tidy Address helper functions,
make ordering of members consistent in allocate and claim,
make linter happier,
remove some unused items, and
update some comments
2015-06-10 17:24:36 +01:00
Bryan Boreham
fa0b0042b2
Eradicate the last vestiges of CIDR in Allocator
2015-06-10 17:24:36 +01:00
Bryan Boreham
e21f66db0a
Use address.Range instead of (start,end) pairs
2015-06-10 17:24:36 +01:00
Bryan Boreham
1e71d2dacb
Introduce new '<address_spec>' type in usage text
2015-06-10 17:24:36 +01:00
Bryan Boreham
a80e5cb028
Corrected space.Donate() to restrict the space donated to be in-range, and associated unit test changes
2015-06-10 17:24:36 +01:00
Bryan Boreham
40c9adc8d3
Extract common freelist-walking code
2015-06-10 17:24:36 +01:00
Bryan Boreham
147962d101
Clarify some unit test operations
2015-06-10 17:24:36 +01:00
Bryan Boreham
6536034ab6
Move default subnet outside of Allocator
2015-06-10 17:24:36 +01:00
Bryan Boreham
7e7a2227a0
Document multi-subnet IPAM
2015-06-10 17:24:36 +01:00
Bryan Boreham
e5113889f4
Move NumFreeAddresses() into test
2015-06-10 17:24:36 +01:00
Bryan Boreham
3cdc3522be
Don't overwrite CIDR_ARGS; write new variables ALL_CIDRS and IPAM_CIDRS
...
Handle manual CIDRs and IPAM CIDRs separately, to avoid inconsistencies and misleading messages
2015-06-10 17:24:35 +01:00
Bryan Boreham
2b4eec39cf
Support '--subnet default'
2015-06-10 17:21:16 +01:00
Bryan Boreham
3a9af4413d
Rationalize ipam arguments
...
- rename -defaultsubnet to -ipsubnet
- default subnet defaults to whole -iprange
- parse and check inside ipam package
- removes some error cases
2015-06-10 17:21:16 +01:00
Bryan Boreham
f956a76455
Tighten error checking in weave script
...
- --subnet is used but IPAM is off
- arg that comes after --subnet is not a cidr
2015-06-10 17:21:16 +01:00
Bryan Boreham
ecbd514a83
Tighten error checking
2015-06-10 17:21:16 +01:00
Bryan Boreham
50eaccc60c
Allocate() and Lookup() now return a CIDR, to simplify output
2015-06-10 17:21:16 +01:00
Bryan Boreham
2a00b0092d
Extend 'Lookup' to multi-subnet
2015-06-10 17:21:16 +01:00
Bryan Boreham
d18ccac43b
Free IPAM addresses individually in 'weave hide', because the user now has the ability to free some subnets and not others
2015-06-10 17:21:16 +01:00
Bryan Boreham
a617e7918c
Introduce single-address Free() and rename the previous one to Delete()
2015-06-10 17:21:16 +01:00
Bryan Boreham
d20d2e9142
Update smoke tests that use IPAM with default subnet
2015-06-10 17:21:16 +01:00
Bryan Boreham
551394a831
Add subnet info to space requests from one peer to another
2015-06-10 17:21:16 +01:00
Bryan Boreham
0613a06653
IPAM: handle multiple CIDRs in weave script
2015-06-10 17:21:16 +01:00
Bryan Boreham
ff545feae3
Add some unit tests for multi-subnet
2015-06-10 17:21:16 +01:00
Bryan Boreham
c7a9dfbb3f
Remember multiple addresses owned by each container, for multi-subnet use
2015-06-10 17:21:16 +01:00
Bryan Boreham
2553850ed4
Initial implementation of multi-subnet IPAM
2015-06-10 17:21:16 +01:00
Bryan Boreham
e6d230042d
Introduce address.CIDR type
2015-06-10 17:21:16 +01:00
Bryan Boreham
ae8985deb5
Merge pull request #884 from rade/881_get_container_id_on_start
...
LGTM. Fixes #881
2015-06-10 17:20:25 +01:00
Bryan Boreham
0cd4127087
Factor out GossipSender.flush()
2015-06-10 12:24:19 +01:00
Bryan Boreham
5ebfc9027b
Flush gossip inside the channel lock so we know sender hasn't been Stop()-ed
2015-06-10 12:22:38 +01:00
Bryan Boreham
35b3a2d6a6
Inline GossipSender.flush() and don't try to send nil
2015-06-10 12:18:09 +01:00
Bryan Boreham
bd5353024f
Helpful suggestions from the linter
2015-06-10 11:05:04 +01:00
Bryan Boreham
569fd784fa
Make flushing of GossipSender wait till done in tests,
...
and take extra locks to avoid race conditions.
Also removed the sendPendingGossip() from mockChannelConnection.SendProtocolMsg(),
because waiting in flush now creates a deadlock. Tests will have to
call sendPendingGossip() explicitly if they need it.
2015-06-10 10:59:54 +01:00
Bryan Boreham
011c86fdca
Merge pull request #852 from rade/816_make_launch_args_order_insensitive
...
LGTM. Fixes #816
2015-06-08 14:34:46 +01:00
Bryan Boreham
62bbaf57a2
Merge pull request #839 from rade/837_tcp_accept_delay
...
LGTM. Closes #837
2015-06-04 14:29:58 +01:00
Bryan Boreham
7acb4be13f
Merge pull request #844 from rade/641_recommend_strong_password
...
LGTM. Closes #641
2015-06-04 14:28:22 +01:00
Bryan Boreham
2a244e5699
Simplify paxos.Consensus() call
2015-06-04 13:30:15 +01:00
Bryan Boreham
c1f8b62e11
Merge pull request #832 from rade/412_min_backoff
...
LGTM. Fixes #412
2015-06-03 12:47:07 +01:00
Bryan Boreham
89074715bc
Merge pull request #823 from bboreham/818-claim-no-trunc
...
Fixes #818
2015-06-02 16:12:47 +01:00
Bryan Boreham
4968f0f3c4
Merge pull request #822 from bboreham/802-test-race
...
Fix race condition in allocator fuzz-test - fixes #802
2015-06-02 16:12:22 +01:00
Bryan Boreham
aa7c7a9a9d
Add --no-trunc flag to docker ps for ipam_claim
2015-06-02 16:07:48 +01:00
Bryan Boreham
6a1b658f59
Fix race condition in allocator fuzz-test
...
It was possible to free an address between deciding to re-test it
and actually re-testing it. So introduced a flag 'block' to prevent
an address from being freed during the re-test.
2015-06-02 16:04:35 +01:00
Bryan Boreham
2698f3f376
Merge remote-tracking branch 'upstream/0.11'
2015-06-01 11:42:30 +01:00
Bryan Boreham
cd1cca3df2
Reformat output of pending ipam requests
2015-06-01 10:55:01 +01:00
Bryan Boreham
1d6f1f7561
Improve ipam status message before and after pending consensus
2015-05-29 17:34:17 +01:00
Bryan Boreham
0ab2263a41
Merge pull request #793 from bboreham/ipam-avoid-unittest-races
...
[ipam] Fix race conditions in unit tests
2015-05-29 12:30:39 +01:00
Bryan Boreham
adeb0d3934
Don't bypass the actor mechanism in unit tests, to avoid race conditions
2015-05-29 10:43:19 +01:00
Bryan Boreham
0ee872def4
Lock round mockGossipComms to avoid race conditions
2015-05-29 10:27:17 +01:00
Bryan Boreham
2befd9d473
Merge remote-tracking branch 'origin/0.11'
2015-05-29 09:56:53 +01:00
Bryan Boreham
e37f7de0ad
Improve error reporting of too much free space
2015-05-29 09:44:24 +01:00
Bryan Boreham
72b30bc699
Fix incorrect calculation of free space
...
when granting a range that spans a token and inserting a new token, the
free space on the last token that we are handing over has to change.
Add unit test for this too.
2015-05-29 09:44:14 +01:00
Bryan Boreham
10c3f47bd1
Merge pull request #783 from bboreham/782-space-panic
...
Fixes #782
2015-05-29 09:42:44 +01:00
Bryan Boreham
915bf392e9
Improve error reporting of too much free space
2015-05-28 18:15:04 +01:00
Bryan Boreham
af5531cbf6
Fix incorrect calculation of free space
...
when granting a range that spans a token and inserting a new token, the
free space on the last token that we are handing over has to change.
Add unit test for this too.
2015-05-28 18:12:30 +01:00
Bryan Boreham
cb03d1d763
Merge pull request #772 from alexwlchan/master
...
Thanks!
2015-05-28 10:11:58 +01:00
Bryan Boreham
b10c2e554c
Remove redundant variable
2015-05-27 16:59:12 +01:00
Bryan Boreham
69ac0950fe
Add release 0.11 to CHANGELOG
2015-05-26 13:50:26 +01:00
Bryan Boreham
1e128c142e
Links to Docker docs
2015-05-26 11:42:48 +01:00
Bryan Boreham
aafc1a56f9
Reword weave proxy intro
2015-05-26 11:40:39 +01:00
Bryan Boreham
22b8f482ea
Fix a couple of mistakes in get_ipam_cidr calls
...
(first one only caused a slight slow-down; second one only mattered if
your 'weave' container had a non-standard name)
2015-05-21 12:05:48 +01:00
Bryan Boreham
b771528942
Check if Docker using weave bridge before inserting DROP rule
...
and comment the use of -I
2015-05-21 10:14:15 +01:00
Bryan Boreham
f727e56bad
Revert "consistency"
...
This reverts commit c5d5dd5fdc .
2015-05-21 09:54:46 +01:00
Bryan Boreham
9e79d7dcca
Don't talk to IPAM unless 0 addresses supplied to 'hide'
2015-05-20 12:59:04 +01:00