Bryan Boreham
d0e0df9bd4
Merge pull request #1350 from weaveworks/ipam-json
...
Add GET /ip handler to return all IPAM mappings.
2017-04-06 10:09:01 +01:00
Bryan Boreham
8f27f8f442
Clean up some tests that were not checking results
2017-03-21 11:38:35 +00:00
Bryan Boreham
1af5699948
cancelOp was cancelling the first op in the queue
2017-03-21 11:38:35 +00:00
Tom Wilkie
c06d4d1b00
Add GET /ip handler to return all IPAM mappings.
2017-03-10 11:39:47 +00:00
Bryan Boreham
4e37f5ec42
Add explanations of various claim and allocation fields
2017-02-13 17:31:02 +00:00
Bryan Boreham
7075b5d9fd
Extend pre-existing address reclaim to docker containers
2017-02-13 11:30:34 +00:00
Bryan Boreham
39ac1a0037
Collect existing weave addresses at start-up, to avoid a race when
...
doing it from the script
Note we need to run weaver in the host pid namespace, so it can search
for existing container IPs. Also now we are firing off sub-processes
it's better to not be PID 1 so Linux doesn't expect us to reap zombies.
2017-02-10 15:10:02 +00:00
Bryan Boreham
30d6639a98
Refactor: move peer name identifier to DB package
2017-01-11 13:05:25 +00:00
Adam Harrison
c3a2539445
Merge branch '1.8'
2016-11-22 16:17:30 +00:00
Bryan Boreham
d5f1c233bf
Remove punctuation from the end of error messages
...
to placate the linter
2016-11-18 10:40:41 +00:00
Bryan Boreham
e42600632f
Don't release dead container's IP addresses if not asked to check it is alive.
2016-11-14 19:53:54 +00:00
Adam Harrison
915638d17a
Address linter failures
2016-11-14 15:13:19 +00:00
Marc CARRE
0544901357
Factorise "_" duplicates as a constant.
2016-11-11 17:00:26 +00:00
Marc CARRE
bc94633180
Re-claim IP on start-up when an existing ID has been found.
...
- Rewrote conditions to keep c.ident immutable and hopefully makes
things clearer.
- Added a case to tolerate reclaim after we have used CNI (passed CID
is “_” and existing CID is a real container ID).
2016-11-11 17:00:26 +00:00
Bryan Boreham
6d5af85eee
Report count of active IP addresses in status
2016-10-20 14:04:41 +01:00
Bryan Boreham
1ae2d33714
Remove old-style 'expvar' metrics
2016-10-20 13:54:42 +01:00
Martynas Pumputis
58caf38f07
Fix re-attaching of weave router in awsvpc mode
...
In order to re-attach the router and make it work in awsvpc mode,
the following has to be done:
- expose_ip on the router
- adjusting arp settings
- restoring host routes
To detect that we run in awsvpc mode, we inspect cmd parameters
of the weave router instead of GET'ing /ipinfo/tracker. This is so,
because the HTTP server started by the router might not be running
at the time of restoration.
2016-06-29 11:15:49 +01:00
Martynas Pumputis
8569cbd4a3
Force transferring of IPAM ranges in a case of Shutdown
...
If no peer for transfer is found, we transfer them to
mesh.UnknownPeerName to notify the ring update tracker.
Makes the awsvpc tracker to remove local entries from
the VPC route table when the last peer calls "weave reset".
2016-06-10 11:51:31 +01:00
Adam Harrison
adcb1018df
Merge pull request #2345 from weaveworks/issues/2344-persist-more
...
Fix ring persistence after free space update
2016-06-09 16:37:57 +01:00
Martynas Pumputis
de2a70861c
Add GET /ipinfo/tracker
...
The endpoint returns the name of tracker. It is used to determine
whether the router is running a tracker.
2016-06-08 16:44:54 +01:00
Martynas Pumputis
9fc7be83c8
Create a Tracker when starting the router
...
The tracker's HandleUpdate method is called by the ring update routines.
In addition, we add a dummy overlay for AWSVPC to make `weave (status|
report)` to produce reasonable reports which includes AWS hosts
connection state.
2016-06-08 16:44:54 +01:00
Martynas Pumputis
c260536429
Add AWSVPC Tracker
...
The tracker is responsible for managing the AWSVPC route tables
which is used to implement the underlay routing based on VPC.
2016-06-08 16:44:54 +01:00
Martynas Pumputis
59b3a3c8c5
Add the Tracker interface
...
An instance of the interface must implement the HandleUpdate method
which (in the future) will be called when any change to the IPAM ring
occurs.
2016-06-08 16:44:54 +01:00
Martynas Pumputis
49f2e208c3
Make ClaimForPeers to claim CIDR-aligned ranges
2016-06-08 16:44:54 +01:00
Bryan Boreham
d1bba977f3
Don't stop reporting free space at the first unchanged range
2016-06-08 11:53:35 +01:00
Bryan Boreham
e2bee6e8c6
Persist ring after updates caused by reportFreeSpace()
2016-06-08 11:52:38 +01:00
Bryan Boreham
1d91c1a23b
Cleanup: change ring test from 255 to 256 in length, which is more realistic
2016-06-01 17:51:21 +01:00
Martynas Pumputis
f50fbc002e
Change ipam Universe from Range to CIDR
...
There was no code to initialize it as anything else, and this lets us
bake in an assumption that it will always be a CIDR.
2016-06-01 17:06:31 +01:00
Adam Harrison
f02b78ed73
Merge branch '1.5'
...
Closes #2282
2016-05-26 16:16:54 +01:00
Bryan Boreham
cda1084777
Check validity of IP subnets
...
Be more consistent about this - check in the same way whether at startup
or during allocation.
2016-05-26 14:31:17 +00:00
Martynas Pumputis
85cea672d3
Change the type of entry.Free to address.Count
...
This change is backward compatible, because the underlying types of
address.Offset (the previous type) and address.Count are the same
and the Gob encoder does not require types to exactly correspond.
2016-05-16 15:03:05 +01:00
Bryan Boreham
d551b6b0a8
Review feedback
2016-05-13 16:27:28 +01:00
Bryan Boreham
1ec2c0fb3f
Use a CIDR-aligned CIDR in unit tests
2016-05-13 16:27:28 +01:00
Bryan Boreham
64dc7a1f69
Donate power-of-2-aligned ranges instead of just slicing at the mid-point.
...
Also fix up space tests to match.
2016-05-13 16:27:28 +01:00
Martynas Pumputis
178438c470
Merge branch '1.5'
2016-05-10 17:36:56 +01:00
Martynas Pumputis
632694472c
Merge pull request #2281 from weaveworks/issues/2275-request-order
...
Ignore IPAM requests for space until we have a ring
Fixes #2275
2016-05-10 17:36:26 +01:00
Martynas Pumputis
14e1145972
Merge branch '1.5'
2016-05-10 17:34:08 +01:00
Bryan Boreham
16b75f899e
Move sleep on reset from IPAM Allocator to weave script
2016-05-10 16:03:08 +01:00
Bryan Boreham
c3abe4f7b2
If we don't have a ring, just ignore a request for space.
2016-05-10 15:33:13 +01:00
Martynas Pumputis
f7bddab4cb
Merge branch '1.5'
2016-05-10 15:27:15 +01:00
Martynas Pumputis
c434345960
Fix typo
2016-05-10 15:24:38 +01:00
Martynas Pumputis
f9157acced
Fix logging
2016-05-10 15:18:10 +01:00
Bryan Boreham
de9597b6fa
Merge branch '1.5'
2016-05-09 14:38:00 +01:00
Martynas Pumputis
d698aefbfc
Make Claim to block if the IPAM ring is not established
2016-05-09 12:48:41 +01:00
Matthias Radestock
438efcccda
Merge branch '1.5'
2016-05-07 20:19:18 +01:00
Matthias Radestock
daa369b86c
refactor: extract a couple of helpers in allocator tests
...
to reduce repetition
2016-05-07 20:18:21 +01:00
Matthias Radestock
32ba82efaf
Merge branch '1.5'
2016-05-05 14:50:00 +01:00
Matthias Radestock
b1aa52b3ed
Merge pull request #2238 from weaveworks/missing-persist
...
Persist the IPAM ring on `weave reset` and `weave rmpeer`
2016-05-05 14:41:53 +01:00
Adam Harrison
34b95ee36f
Merge branch '1.5'
2016-05-05 10:11:50 +01:00
Adam Harrison
1283ba4f61
Merge pull request #2249 from weaveworks/issues/2209-depersist-on-range-change
...
Better deleting of persisted IPAM data
2016-05-05 10:11:22 +01:00