Commit Graph
40 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 a43bd88ddd Add the error message why an IP claim is denied 2019-10-25 17:13:59 +00:00
Bryan Boreham e8fcd21baa Retry IP allocator claims
It may be that we cannot talk to a peer straight away, so allow claims
to be retried a few times before giving up.
2019-10-25 17:13:11 +00:00
Bryan Boreham b01a204c1f Check who previously owned an address claimed outside the range 2017-06-08 16:25:09 +00:00
Bryan Boreham e9310eba98 Don't use '_' as container ID in claim outside range
And added unit test for various claim-without-ID situations
2017-06-07 16:38:19 +00:00
Bryan Boreham 4e37f5ec42 Add explanations of various claim and allocation fields 2017-02-13 17:31:02 +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
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
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
Martynas Pumputis d698aefbfc Make Claim to block if the IPAM ring is not established 2016-05-09 12:48:41 +01:00
Bryan Boreham 70bd0ade45 Identifier "_" is address, not cidr 2016-05-03 15:47:45 +01:00
Bryan Boreham 5e4ab7f307 Plumb isContainer through Claim calls 2016-04-18 10:16:54 +01:00
Bryan Boreham b76e2a87cf Store address+subnet prefix for 'owned' addresses 2016-03-02 17:21:24 -08:00
Bryan Boreham 03563e847e Remember addresses outside of the allocation range 2016-03-02 17:01:12 -08:00
Bryan Boreham 610a90c727 Claim address requested by caller 2016-01-27 12:11:01 +00:00
Peter Bourgon e27b320ede Update import location for mesh 2016-01-15 15:57:01 +01:00
Bryan Boreham 2f885a7906 Reclaim all addresses on restart 2016-01-12 14:38:44 +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
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
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
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 2d224d423d Add SpaceRequestDenied message 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
Matthias Radestock 2b61bc91df cosmetic: remove blank log lines 2015-07-11 16:43:33 +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 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 4fdb14293b Move ipam/address to net/address 2015-07-07 10:33:20 +00: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 a617e7918c Introduce single-address Free() and rename the previous one to Delete() 2015-06-10 17:21:16 +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