45 Commits
Author SHA1 Message Date
Raj Chaudhuri c1d3107418 Changed module name, edited default manifests in prog/weave-kube
* Module name changed to `github.com/rajch/weave`
* Added environment variable `CHECKPOINT_DISABLE=1` to default manifests, to bypass weaveworks telemetry
2024-03-01 18:05:19 +05:30
Bryan Boreham c197624689 Fix up incorrect output formatting 2020-07-31 09:03:27 +00:00
Bryan Boreham 00bc020498 Use Context instead of deprecated http.CloseNotifier interface 2020-07-31 09:03:27 +00:00
Martynas Pumputis 79f77f94f4 ipam: Do not deref nil in GET /ipinfo/tracker if tracker doesn't exist
In some cases, we do not create any IPAM tracker, which leads
to a panic when GET'ing /ipinfo/tracker.
2018-09-21 13:29:03 +03:00
Martynas Pumputis 62c30d9130 Extern LocalRangeTracker interface with String method
Cleaner approach than passing a tracker name to ipam/http.
2018-06-04 14:08:24 +02:00
Bryan Boreham 768f89c3de Move peer http handlers from ipam to weaver 2017-04-10 14:09:06 +00:00
Tom Wilkie c06d4d1b00 Add GET /ip handler to return all IPAM mappings. 2017-03-10 11:39:47 +00: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
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 c434345960 Fix typo 2016-05-10 15:24:38 +01:00
Martynas Pumputis d698aefbfc Make Claim to block if the IPAM ring is not established 2016-05-09 12:48:41 +01:00
Bryan Boreham 5e4ab7f307 Plumb isContainer through Claim calls 2016-04-18 10:16:54 +01:00
Bryan Boreham 2b159b0c75 Pass checkAlive flag through as isContainer in Allocate 2016-04-18 10:16:54 +01:00
Adam Harrison a09986baa2 Rename consense -> prime 2016-04-14 12:46:03 +01:00
Matthias Radestock 62d823850c make rmpeer report on size of transferred space, and not fail
Closes #2058.
2016-03-19 14:40:26 +00:00
Adam Harrison 6584df274e Implement weave consense 2016-03-03 18:52:09 +00:00
Bryan Boreham 604309fb53 Parse CIDR strings without separating into subnet and address 2016-03-02 17:21:52 -08: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 f87876c1c3 Fetch the default subnet from weave to use as the ipam driver 'pool' 2015-12-08 16:59:34 +00: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
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
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
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
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
Bryan Boreham a5ddb63fca Remove Info.Print in favour of Log.Info 2015-07-01 14:01:45 +01:00
Bryan Boreham d82578d895 Replace logging calls with new style 2015-07-01 12:26:23 +01:00
Bryan Boreham 4c01af4e1d Check if container is still running right after allocating 2015-06-12 17:09:11 +01:00
Bryan Boreham fa0b0042b2 Eradicate the last vestiges of CIDR in Allocator 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 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 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 a617e7918c Introduce single-address Free() and rename the previous one to Delete() 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
Michael Bridgen 791584d9f3 Allow lookup of IPAM-allocated addresses 2015-06-02 17:31:25 +01:00
Bryan Boreham ee7dac9e28 Improve error messages
Make clear that they come from the IP allocator, and reduce repetition in the text.
Also include the nickname for other peer, if known.
2015-05-19 12:37:57 +01:00
Bryan Boreham 3cd1a17c23 IP Allocation Management
Using the Ring CRDT and Weave gossip, provides an interface
for the weave script to allocate IP addresses in `weave run`,
`weave start` and `weave expose`.

See docs/ipam.md for implementation details, and site/features.md
for user-visible changes.
2015-05-14 17:44:06 +01:00