Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82cf4358ce | ||
|
|
2e42d74c59 | ||
|
|
bbf26fc3e8 | ||
|
|
385b0aa07f | ||
|
|
f2b1ee3398 | ||
|
|
2a2c60201f | ||
|
|
ee12b34334 | ||
|
|
f25af8f7d6 | ||
|
|
1500b1dc00 | ||
|
|
9263d3e82c | ||
|
|
02b7fd53ed | ||
|
|
3cd199e852 | ||
|
|
de802f9d76 | ||
|
|
804e6ba586 |
No files matched your search
@@ -1,3 +1,20 @@
|
|||||||
|
## Release 1.3.1
|
||||||
|
|
||||||
|
**Highlights**
|
||||||
|
|
||||||
|
* The minimum Docker version has been increased to 1.6 due to the
|
||||||
|
[upcoming deprecation of Dockerhub access](https://blog.docker.com/2015/10/docker-hub-deprecation-1-5/)
|
||||||
|
for old clients. From December 7th onwards previous versions of the
|
||||||
|
`weave` script will fail to pull down images from the hub; if you
|
||||||
|
are unable to upgrade to 1.3.1 immediately you can work around this
|
||||||
|
by running `weave --local setup` in conjunction with a compatible
|
||||||
|
Docker client installation
|
||||||
|
* Docker networking plugin now works with older kernels and allows you
|
||||||
|
to configure the MTU
|
||||||
|
|
||||||
|
More details in the
|
||||||
|
[change log](https://github.com/weaveworks/weave/issues?q=milestone%3A1.3.1).
|
||||||
|
|
||||||
## Release 1.3.0
|
## Release 1.3.0
|
||||||
|
|
||||||
**Highlights**
|
**Highlights**
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ IMAGES=$(WEAVER_IMAGE) $(WEAVEEXEC_IMAGE)
|
|||||||
|
|
||||||
WEAVE_EXPORT=weave.tar.gz
|
WEAVE_EXPORT=weave.tar.gz
|
||||||
|
|
||||||
WEAVEEXEC_DOCKER_VERSION=1.3.1
|
WEAVEEXEC_DOCKER_VERSION=1.6.2
|
||||||
DOCKER_DISTRIB=prog/weaveexec/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz
|
DOCKER_DISTRIB=prog/weaveexec/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz
|
||||||
DOCKER_DISTRIB_URL=https://get.docker.com/builds/Linux/x86_64/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz
|
DOCKER_DISTRIB_URL=https://get.docker.com/builds/Linux/x86_64/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz
|
||||||
NETGO_CHECK=@strings $@ | grep cgo_stub\\\.go >/dev/null || { \
|
NETGO_CHECK=@strings $@ | grep cgo_stub\\\.go >/dev/null || { \
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ capabilities, so these can continue to be used by containers.
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Ensure you are running Linux (kernel 3.8 or later) and have Docker
|
Ensure you are running Linux (kernel 3.8 or later) and have Docker
|
||||||
(version 1.3.1 or later) installed. Then install weave with
|
(version 1.6.0 or later) installed. Then install weave with
|
||||||
|
|
||||||
sudo curl -L git.io/weave -o /usr/local/bin/weave
|
sudo curl -L git.io/weave -o /usr/local/bin/weave
|
||||||
sudo chmod a+x /usr/local/bin/weave
|
sudo chmod a+x /usr/local/bin/weave
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ FROM ubuntu
|
|||||||
RUN apt-get -y update && apt-get -y install --no-install-recommends ca-certificates apt-transport-https
|
RUN apt-get -y update && apt-get -y install --no-install-recommends ca-certificates apt-transport-https
|
||||||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
|
||||||
RUN echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
|
RUN echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
|
||||||
RUN apt-get -y update && apt-get -y install --no-install-recommends build-essential git lxc-docker-1.3.1 mercurial libpcap-dev curl make pkg-config gcc bison flex python-requests
|
RUN apt-get -y update && apt-get -y install --no-install-recommends build-essential git lxc-docker-1.6.2 mercurial libpcap-dev curl make pkg-config gcc bison flex python-requests
|
||||||
|
|
||||||
# When doing a build in a container, "apt-get update" happens twice,
|
# When doing a build in a container, "apt-get update" happens twice,
|
||||||
# which can be a very significant overhead for incremental builds.
|
# which can be a very significant overhead for incremental builds.
|
||||||
|
|||||||
+2
-2
@@ -478,8 +478,8 @@ type ipamGossipData struct {
|
|||||||
alloc *Allocator
|
alloc *Allocator
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *ipamGossipData) Merge(other mesh.GossipData) {
|
func (d *ipamGossipData) Merge(other mesh.GossipData) mesh.GossipData {
|
||||||
// no-op
|
return d // no-op
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *ipamGossipData) Encode() [][]byte {
|
func (d *ipamGossipData) Encode() [][]byte {
|
||||||
|
|||||||
+3
-4
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
type GossipData interface {
|
type GossipData interface {
|
||||||
Encode() [][]byte
|
Encode() [][]byte
|
||||||
Merge(GossipData)
|
Merge(GossipData) GossipData
|
||||||
}
|
}
|
||||||
|
|
||||||
type Gossip interface {
|
type Gossip interface {
|
||||||
@@ -79,8 +79,7 @@ func (sender *GossipSender) Send(data GossipData) {
|
|||||||
// NB: this must not be invoked concurrently
|
// NB: this must not be invoked concurrently
|
||||||
select {
|
select {
|
||||||
case pending := <-sender.cell:
|
case pending := <-sender.cell:
|
||||||
pending.Merge(data)
|
sender.cell <- pending.Merge(data)
|
||||||
sender.cell <- pending
|
|
||||||
default:
|
default:
|
||||||
sender.cell <- data
|
sender.cell <- data
|
||||||
}
|
}
|
||||||
@@ -142,7 +141,7 @@ func (router *Router) SendAllGossip() {
|
|||||||
func (router *Router) SendAllGossipDown(conn Connection) {
|
func (router *Router) SendAllGossipDown(conn Connection) {
|
||||||
for channel := range router.gossipChannelSet() {
|
for channel := range router.gossipChannelSet() {
|
||||||
if gossip := channel.gossiper.Gossip(); gossip != nil {
|
if gossip := channel.gossiper.Gossip(); gossip != nil {
|
||||||
channel.SendDown(conn, channel.gossiper.Gossip())
|
channel.SendDown(conn, gossip)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-8
@@ -127,17 +127,19 @@ func (router *Router) BroadcastTopologyUpdate(update []*Peer) {
|
|||||||
for _, p := range update {
|
for _, p := range update {
|
||||||
names[p.Name] = void
|
names[p.Name] = void
|
||||||
}
|
}
|
||||||
|
router.TopologyGossip.GossipBroadcast(
|
||||||
router.TopologyGossip.GossipBroadcast(&TopologyGossipData{
|
&TopologyGossipData{peers: router.Peers, update: names})
|
||||||
peers: router.Peers,
|
|
||||||
update: names,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *TopologyGossipData) Merge(other GossipData) {
|
func (d *TopologyGossipData) Merge(other GossipData) GossipData {
|
||||||
for name := range other.(*TopologyGossipData).update {
|
names := make(PeerNameSet)
|
||||||
d.update[name] = void
|
for name := range d.update {
|
||||||
|
names[name] = void
|
||||||
}
|
}
|
||||||
|
for name := range other.(*TopologyGossipData).update {
|
||||||
|
names[name] = void
|
||||||
|
}
|
||||||
|
return &TopologyGossipData{peers: d.peers, update: names}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *TopologyGossipData) Encode() [][]byte {
|
func (d *TopologyGossipData) Encode() [][]byte {
|
||||||
|
|||||||
@@ -12,8 +12,12 @@ func (d *SurrogateGossipData) Encode() [][]byte {
|
|||||||
return d.messages
|
return d.messages
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *SurrogateGossipData) Merge(other GossipData) {
|
func (d *SurrogateGossipData) Merge(other GossipData) GossipData {
|
||||||
d.messages = append(d.messages, other.(*SurrogateGossipData).messages...)
|
o := other.(*SurrogateGossipData)
|
||||||
|
messages := make([][]byte, 0, len(d.messages)+len(o.messages))
|
||||||
|
messages = append(messages, d.messages...)
|
||||||
|
messages = append(messages, o.messages...)
|
||||||
|
return &SurrogateGossipData{messages: messages}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SurrogateGossiper ignores unicasts and relays broadcasts and gossips.
|
// SurrogateGossiper ignores unicasts and relays broadcasts and gossips.
|
||||||
|
|||||||
+13
-7
@@ -245,12 +245,14 @@ type GossipData struct {
|
|||||||
Entries
|
Entries
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *GossipData) Merge(o mesh.GossipData) {
|
func (g *GossipData) Merge(o mesh.GossipData) mesh.GossipData {
|
||||||
other := o.(*GossipData)
|
other := o.(*GossipData)
|
||||||
g.Entries.merge(other.Entries)
|
gossip := g.copy()
|
||||||
if g.Timestamp < other.Timestamp {
|
gossip.Entries.merge(other.Entries)
|
||||||
g.Timestamp = other.Timestamp
|
if gossip.Timestamp < other.Timestamp {
|
||||||
|
gossip.Timestamp = other.Timestamp
|
||||||
}
|
}
|
||||||
|
return gossip
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *GossipData) Decode(msg []byte) error {
|
func (g *GossipData) Decode(msg []byte) error {
|
||||||
@@ -264,9 +266,7 @@ func (g *GossipData) Decode(msg []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *GossipData) Encode() [][]byte {
|
func (g *GossipData) Encode() [][]byte {
|
||||||
// Make a copy so we can sort: all outgoing data is sent in case-sensitive order
|
g2 := g.copy()
|
||||||
g2 := GossipData{Timestamp: g.Timestamp, Entries: make(Entries, len(g.Entries))}
|
|
||||||
copy(g2.Entries, g.Entries)
|
|
||||||
sort.Sort(CaseSensitive(g2.Entries))
|
sort.Sort(CaseSensitive(g2.Entries))
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
if err := gob.NewEncoder(buf).Encode(g2); err != nil {
|
if err := gob.NewEncoder(buf).Encode(g2); err != nil {
|
||||||
@@ -274,3 +274,9 @@ func (g *GossipData) Encode() [][]byte {
|
|||||||
}
|
}
|
||||||
return [][]byte{buf.Bytes()}
|
return [][]byte{buf.Bytes()}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *GossipData) copy() *GossipData {
|
||||||
|
g2 := &GossipData{Timestamp: g.Timestamp, Entries: make(Entries, len(g.Entries))}
|
||||||
|
copy(g2.Entries, g.Entries)
|
||||||
|
return g2
|
||||||
|
}
|
||||||
@@ -117,7 +117,7 @@ func TestGossipDataMerge(t *testing.T) {
|
|||||||
g1 := GossipData{Entries: makeEntries("AcDf")}
|
g1 := GossipData{Entries: makeEntries("AcDf")}
|
||||||
g2 := GossipData{Entries: makeEntries("BEf")}
|
g2 := GossipData{Entries: makeEntries("BEf")}
|
||||||
|
|
||||||
g1.Merge(&g2)
|
g3 := g1.Merge(&g2).(*GossipData)
|
||||||
|
|
||||||
require.Equal(t, GossipData{Entries: makeEntries("ABcDEf")}, g1)
|
require.Equal(t, GossipData{Entries: makeEntries("ABcDEf")}, *g3)
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ func main() {
|
|||||||
mflag.BoolVar(&c.NoRewriteHosts, []string{"-no-rewrite-hosts"}, false, "do not automatically rewrite /etc/hosts. Use if you need the docker IP to remain in /etc/hosts")
|
mflag.BoolVar(&c.NoRewriteHosts, []string{"-no-rewrite-hosts"}, false, "do not automatically rewrite /etc/hosts. Use if you need the docker IP to remain in /etc/hosts")
|
||||||
mflag.StringVar(&c.TLSConfig.CACert, []string{"#tlscacert", "-tlscacert"}, "", "Trust certs signed only by this CA")
|
mflag.StringVar(&c.TLSConfig.CACert, []string{"#tlscacert", "-tlscacert"}, "", "Trust certs signed only by this CA")
|
||||||
mflag.StringVar(&c.TLSConfig.Cert, []string{"#tlscert", "-tlscert"}, "", "Path to TLS certificate file")
|
mflag.StringVar(&c.TLSConfig.Cert, []string{"#tlscert", "-tlscert"}, "", "Path to TLS certificate file")
|
||||||
mflag.BoolVar(&c.TLSConfig.Enabled, []string{"#tls", "-tls"}, false, "Use TLS; implied by --tls-verify")
|
mflag.BoolVar(&c.TLSConfig.Enabled, []string{"#tls", "-tls"}, false, "Use TLS; implied by --tlsverify")
|
||||||
mflag.StringVar(&c.TLSConfig.Key, []string{"#tlskey", "-tlskey"}, "", "Path to TLS key file")
|
mflag.StringVar(&c.TLSConfig.Key, []string{"#tlskey", "-tlskey"}, "", "Path to TLS key file")
|
||||||
mflag.BoolVar(&c.TLSConfig.Verify, []string{"#tlsverify", "-tlsverify"}, false, "Use TLS and verify the remote")
|
mflag.BoolVar(&c.TLSConfig.Verify, []string{"#tlsverify", "-tlsverify"}, false, "Use TLS and verify the remote")
|
||||||
mflag.BoolVar(&c.WithDNS, []string{"-with-dns", "w"}, false, "instruct created containers to always use weaveDNS as their nameserver")
|
mflag.BoolVar(&c.WithDNS, []string{"-with-dns", "w"}, false, "instruct created containers to always use weaveDNS as their nameserver")
|
||||||
|
|||||||
+3
-3
@@ -81,12 +81,12 @@ func NewProxy(c Config) (*Proxy, error) {
|
|||||||
Log.Fatalf("Could not configure tls for proxy: %s", err)
|
Log.Fatalf("Could not configure tls for proxy: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// We pin the protocol version to 1.15 (which corresponds to
|
// We pin the protocol version to 1.18 (which corresponds to
|
||||||
// Docker 1.3.x; the earliest version supported by weave) in order
|
// Docker 1.6.x; the earliest version supported by weave) in order
|
||||||
// to insulate ourselves from breaking changes to the API, as
|
// to insulate ourselves from breaking changes to the API, as
|
||||||
// happened in 1.20 (Docker 1.8.0) when the presentation of
|
// happened in 1.20 (Docker 1.8.0) when the presentation of
|
||||||
// volumes changed in `inspect`.
|
// volumes changed in `inspect`.
|
||||||
client, err := weavedocker.NewVersionedClient(dockerSockUnix, "1.15")
|
client, err := weavedocker.NewVersionedClient(dockerSockUnix, "1.18")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ You only need to build weave if you want to work on the weave codebase
|
|||||||
Apart from the `weave` shell script, weave is delivered as a set of
|
Apart from the `weave` shell script, weave is delivered as a set of
|
||||||
container images. There is no distribution-specific packaging, so in
|
container images. There is no distribution-specific packaging, so in
|
||||||
principle it shouldn't matter which Linux distribution you build
|
principle it shouldn't matter which Linux distribution you build
|
||||||
under. But naturally, Docker is a prerequisite (version 1.3.1 or
|
under. But naturally, Docker is a prerequisite (version 1.6.0 or
|
||||||
later). And it is difficult to build under Fedora because [Fedora
|
later). And it is difficult to build under Fedora because [Fedora
|
||||||
does not include static
|
does not include static
|
||||||
libraries](http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries).
|
libraries](http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries).
|
||||||
|
|||||||
+4
-4
@@ -237,8 +237,8 @@ supplied to the docker daemon. For example, if you have generated your
|
|||||||
certificates and keys into the docker host's `/tls` directory, we can
|
certificates and keys into the docker host's `/tls` directory, we can
|
||||||
launch the proxy with:
|
launch the proxy with:
|
||||||
|
|
||||||
host1$ weave launch-proxy --tls-verify --tls-cacert=/tls/ca.pem \
|
host1$ weave launch-proxy --tlsverify --tlscacert=/tls/ca.pem \
|
||||||
--tls-cert=/tls/server-cert.pem --tls-key=/tls/server-key.pem
|
--tlscert=/tls/server-cert.pem --tlskey=/tls/server-key.pem
|
||||||
|
|
||||||
The paths to your certificates and key must be provided as absolute
|
The paths to your certificates and key must be provided as absolute
|
||||||
paths which exist on the docker host.
|
paths which exist on the docker host.
|
||||||
@@ -254,8 +254,8 @@ for an example.
|
|||||||
With the proxy running over TLS, we can configure our regular docker
|
With the proxy running over TLS, we can configure our regular docker
|
||||||
client to use TLS on a per-invocation basis with
|
client to use TLS on a per-invocation basis with
|
||||||
|
|
||||||
$ docker --tls-verify --tls-cacert=ca.pem --tls-cert=cert.pem \
|
$ docker --tlsverify --tlscacert=ca.pem --tlscert=cert.pem \
|
||||||
--tls-key=key.pem -H=tcp://host1:12375 version
|
--tlskey=key.pem -H=tcp://host1:12375 version
|
||||||
...
|
...
|
||||||
|
|
||||||
or,
|
or,
|
||||||
|
|||||||
@@ -9,18 +9,20 @@ docker_py_test() {
|
|||||||
|
|
||||||
start_suite "Run docker-py test suite against the proxy"
|
start_suite "Run docker-py test suite against the proxy"
|
||||||
|
|
||||||
|
# Work round https://github.com/docker/docker-py/issues/852
|
||||||
|
docker_on $HOST1 pull busybox:buildroot-2014.02 >/dev/null
|
||||||
# Get a list of the tests for use to shard
|
# Get a list of the tests for use to shard
|
||||||
docker_on $HOST1 pull joffrey/docker-py >/dev/null
|
docker_on $HOST1 pull joffrey/docker-py >/dev/null
|
||||||
CANDIDATES=$(docker_on $HOST1 run \
|
CANDIDATES=$(docker_on $HOST1 run \
|
||||||
joffrey/docker-py \
|
joffrey/docker-py \
|
||||||
py.test --collect-only tests/integration_test.py \
|
py.test --collect-only tests/integration/ \
|
||||||
| sed -En "s/\s*<UnitTestCase '([[:alpha:]]+)'>/\1/p")
|
| sed -En "s/\s*<Module '([[:print:]]+)'>/\1/p")
|
||||||
|
|
||||||
i=0
|
i=0
|
||||||
TESTS=
|
TESTS=
|
||||||
for test in $CANDIDATES; do
|
for test in $CANDIDATES; do
|
||||||
if [ $(($i % $TOTAL_SHARDS)) -eq $SHARD ]; then
|
if [ $(($i % $TOTAL_SHARDS)) -eq $SHARD ]; then
|
||||||
TESTS="$TESTS tests/integration_test.py::$test"
|
TESTS="$TESTS $test"
|
||||||
fi
|
fi
|
||||||
i=$(($i + 1))
|
i=$(($i + 1))
|
||||||
done
|
done
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ This directory contains integration tests for weave.
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
You need two VMs with docker >=1.3.1 installed and listening on TCP
|
You need two VMs with docker >=1.6.0 installed and listening on TCP
|
||||||
port 2375 (see below). You also need to be able to ssh to these VMs,
|
port 2375 (see below). You also need to be able to ssh to these VMs,
|
||||||
preferably without having to input anything.
|
preferably without having to input anything.
|
||||||
|
|
||||||
|
|||||||
@@ -11,19 +11,14 @@ else
|
|||||||
fi
|
fi
|
||||||
IMAGE_VERSION=${WEAVE_VERSION:-$IMAGE_VERSION}
|
IMAGE_VERSION=${WEAVE_VERSION:-$IMAGE_VERSION}
|
||||||
|
|
||||||
# - Docker versions prior to 1.2.0 cannot parse `--dns-search=.`
|
# - Docker versions prior to 1.6 cannot pull images from DockerHub
|
||||||
# - Docker versions prior to 1.3.0 fail to include the domain when
|
# - The weavexec image embeds a Docker 1.6.2 client. Docker will give
|
||||||
# setting the hostname, so lookups for non-fq names fail.
|
# a "client is newer than server error" if the daemon has an older
|
||||||
# - Docker version 1.3.0 contains the severe bug
|
# API version, which could be confusing if the user's Docker client
|
||||||
# https://github.com/docker/docker/issues/8632
|
# is correctly matched with that older version.
|
||||||
# - The weavexec image embeds a Docker 1.3.1 client. Misleading
|
|
||||||
# version mismatch errors are produced if the user is running with a
|
|
||||||
# client *and* server with a lower version.
|
|
||||||
# - Docker will complain if you run a client against a server older
|
|
||||||
# than that client.
|
|
||||||
#
|
#
|
||||||
# We therefore check that the user's Docker *client* is >= 1.3.1
|
# We therefore check that the user's Docker *client* is >= 1.6
|
||||||
MIN_DOCKER_VERSION=1.3.1
|
MIN_DOCKER_VERSION=1.6.0
|
||||||
|
|
||||||
# These are needed for remote execs, hence we introduce them here
|
# These are needed for remote execs, hence we introduce them here
|
||||||
DOCKERHUB_USER=${DOCKERHUB_USER:-weaveworks}
|
DOCKERHUB_USER=${DOCKERHUB_USER:-weaveworks}
|
||||||
|
|||||||
Reference in new issue
Block a user