* Module name changed to `github.com/rajch/weave`
* Added environment variable `CHECKPOINT_DISABLE=1` to default manifests, to bypass weaveworks telemetry
Turn some Sprint() calls into `%v` in the outer format string.
Remove one debug log line on duplicate token, since that info is already logged.
Add an Info log line when we accept another peer's token, since that
should be a rare event, and it's important if we've made a mistake.
Ring wraps around at zero but Space doesn't know about this, so we
have to normalise ranges coming out of Ring. In turn we may need to
split one range into two, across the end of the Ring.
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.
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.
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.
Merging a ring now indicates whether the ring has been updated. This
prevents excessive allocation retries, which in turn can result in
repeated space requests - i.e. if an allocation cannot proceed due to
lack of space - which in turn can result in excessive ring
fragmentation since many of the requests will result in the creation
of a new ring entries, due to the need to split ranges.
Fixes#2181.
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.
This is an early detector for a multitude of other symptoms, some of
which cause panics.
When creating the ring we record the paxos-supplied normalised list of
peers used for seeding. This subsequently gets gossipped around as
part of the Ring data structure, and checked in ring.Merge that it is
the same for the recipient.
There are some subtleties due to the desire to maintain backward
compatibility and deal with empty rings
- The gossip gob decoder will ignore the Ring.Seeds field when an old
weave receives a Ring from a new weave. So everything on the old
weave will just continue to work as before.
- The gossip gob decoder will set the Ring.Seeds field to nil when a
new weave receives a Ring from an old weave. We therefore omit the
seed equivalence check when the received Seeds slice is empty.
- Our ring may not have any seeds - either because it is empty or was
created from a ring received from an old weave. We therefore a) omit
the seed equivalence check in that situation, and b) set our seeds
to those received. Note that this allows us to learn about the seeds
well after ring creation - a situation which may arise when
receiving gossip from a mixture of old and new weaves.
Fixes#1463.