Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5dfe1d28ff | ||
|
|
81134b408d | ||
|
|
26fdd5da03 | ||
|
|
8184d29d4a | ||
|
|
fef91b5339 | ||
|
|
24de98e188 | ||
|
|
6b5f35e574 | ||
|
|
bca31c7335 | ||
|
|
7652b44c21 | ||
|
|
548b4aea40 | ||
|
|
1df752cd33 | ||
|
|
79d1c404a7 | ||
|
|
086ab9d126 | ||
|
|
135c34a45a | ||
|
|
ca6e54890c | ||
|
|
1326994a6d | ||
|
|
e61f9afb72 | ||
|
|
0b764a2a27 | ||
|
|
dc91ce9ec6 | ||
|
|
36a857f343 | ||
|
|
147a537b82 | ||
|
|
a4844b8ee7 | ||
|
|
b4e13215c7 | ||
|
|
aa19028583 | ||
|
|
a6e2296e0a |
No files matched your search
+1
-1
@@ -15,7 +15,7 @@ install:
|
||||
- go clean -i net
|
||||
- go install -tags netgo std
|
||||
- go get github.com/golang/lint/golint
|
||||
- pip install --user --upgrade gcloud gsutil
|
||||
- pip install --user --upgrade gsutil
|
||||
- bin/setup-ci-secrets $encrypted_5ba036e89377_key $encrypted_5ba036e89377_iv
|
||||
- make travis
|
||||
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
## Release 1.0.3
|
||||
|
||||
This release contains a weaveDNS feature enhancement as well as minor fixes for
|
||||
improved stability and robustness.
|
||||
|
||||
More details in the
|
||||
[change log](https://github.com/weaveworks/weave/issues?q=milestone%3A1.0.3).
|
||||
|
||||
The release is fully compatible with other 1.0.x versions, so existing
|
||||
clusters can be upgraded incrementally.
|
||||
|
||||
## Release 1.0.2
|
||||
|
||||
This release fixes a number of bugs, including some security
|
||||
|
||||
@@ -588,7 +588,7 @@ func TestFuzzRing(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFuzzRingHard(t *testing.T) {
|
||||
//common.InitDefaultLogging(true)
|
||||
//common.SetLogLevel("debug")
|
||||
var (
|
||||
numPeers = 100
|
||||
iterations = 3000
|
||||
@@ -635,13 +635,8 @@ func TestFuzzRingHard(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
// Pick one peer to remove, and a different one to transfer to
|
||||
peerIndex, peername, _ := randomPeer(-1)
|
||||
// Remove peer from our state
|
||||
peers = append(peers[:peerIndex], peers[peerIndex+1:]...)
|
||||
rings = append(rings[:peerIndex], rings[peerIndex+1:]...)
|
||||
theRanges = make(map[int][]address.Range)
|
||||
|
||||
// Transfer the space for this peer on another peer, but not this one
|
||||
_, otherPeername, otherRing := randomPeer(peerIndex)
|
||||
|
||||
// We need to be in a ~converged ring to rmpeer
|
||||
@@ -650,7 +645,12 @@ func TestFuzzRingHard(t *testing.T) {
|
||||
}
|
||||
|
||||
common.Debug.Printf("%s: transferring from peer %s", otherPeername, peername)
|
||||
otherRing.Transfer(peername, peername)
|
||||
otherRing.Transfer(peername, otherPeername)
|
||||
|
||||
// Remove peer from our state
|
||||
peers = append(peers[:peerIndex], peers[peerIndex+1:]...)
|
||||
rings = append(rings[:peerIndex], rings[peerIndex+1:]...)
|
||||
theRanges = make(map[int][]address.Range)
|
||||
|
||||
// And now tell everyone about the transfer - rmpeer is
|
||||
// not partition safe
|
||||
|
||||
@@ -45,6 +45,7 @@ func (i *createContainerInterceptor) InterceptRequest(r *http.Request) error {
|
||||
return err
|
||||
}
|
||||
r.Body.Close()
|
||||
r.Body = ioutil.NopCloser(bytes.NewReader(body))
|
||||
|
||||
container := createContainerRequestBody{}
|
||||
if err := json.Unmarshal(body, &container); err != nil {
|
||||
@@ -68,14 +69,14 @@ func (i *createContainerInterceptor) InterceptRequest(r *http.Request) error {
|
||||
if err := i.setWeaveDNS(&container, r); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
newBody, err := json.Marshal(container)
|
||||
if err != nil {
|
||||
return err
|
||||
newBody, err := json.Marshal(container)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r.Body = ioutil.NopCloser(bytes.NewReader(newBody))
|
||||
r.ContentLength = int64(len(newBody))
|
||||
}
|
||||
r.Body = ioutil.NopCloser(bytes.NewReader(newBody))
|
||||
r.ContentLength = int64(len(newBody))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package proxy
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
@@ -18,6 +19,7 @@ func (i *createExecInterceptor) InterceptRequest(r *http.Request) error {
|
||||
return err
|
||||
}
|
||||
r.Body.Close()
|
||||
r.Body = ioutil.NopCloser(bytes.NewReader(body))
|
||||
|
||||
options := docker.CreateExecOptions{}
|
||||
if err := json.Unmarshal(body, &options); err != nil {
|
||||
@@ -29,21 +31,21 @@ func (i *createExecInterceptor) InterceptRequest(r *http.Request) error {
|
||||
return err
|
||||
}
|
||||
|
||||
_, hasWeaveWait := container.Volumes["/w"]
|
||||
if _, hasWeaveWait := container.Volumes["/w"]; !hasWeaveWait {
|
||||
return nil
|
||||
}
|
||||
|
||||
cidrs, err := i.proxy.weaveCIDRsFromConfig(container.Config, container.HostConfig)
|
||||
if err != nil {
|
||||
Info.Printf("Ignoring container %s due to %s", container.ID, err)
|
||||
} else if hasWeaveWait {
|
||||
Info.Printf("Exec in container %s with WEAVE_CIDR \"%s\"", container.ID, strings.Join(cidrs, " "))
|
||||
cmd := append(weaveWaitEntrypoint, "-s")
|
||||
options.Cmd = append(cmd, options.Cmd...)
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := marshalRequestBody(r, options); err != nil {
|
||||
return err
|
||||
}
|
||||
Info.Printf("Exec in container %s with WEAVE_CIDR \"%s\"", container.ID, strings.Join(cidrs, " "))
|
||||
cmd := append(weaveWaitEntrypoint, "-s")
|
||||
options.Cmd = append(cmd, options.Cmd...)
|
||||
|
||||
return nil
|
||||
return marshalRequestBody(r, options)
|
||||
}
|
||||
|
||||
func (i *createExecInterceptor) InterceptResponse(r *http.Response) error {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ const (
|
||||
Port = 6783
|
||||
HTTPPort = Port + 1
|
||||
DefaultPMTU = 65535
|
||||
MaxUDPPacketSize = 65536
|
||||
MaxUDPPacketSize = 65535
|
||||
ChannelSize = 16
|
||||
FragTestSize = 60001
|
||||
PMTUDiscoverySize = 60000
|
||||
|
||||
+26
-20
@@ -113,17 +113,32 @@ func (c *GossipChannel) Send(srcName PeerName, data GossipData) {
|
||||
connections := c.ourself.Connections()
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
// GC - randomly (courtesy of go's map iterator) pick some
|
||||
// existing entries and stop&remove them if the associated
|
||||
// connection is no longer active. We stop as soon as we
|
||||
// encounter a valid entry; the idea being that when there is
|
||||
// little or no garbage then this executes close to O(1)[1],
|
||||
// whereas when there is lots of garbage we remove it quickly.
|
||||
//
|
||||
// [1] TODO Unfortunately, due to the desire to avoid nested
|
||||
// locks, instead of simply invoking Peer.ConnectionTo(name)
|
||||
// below, we have that Peer.Connections() invocation above. That
|
||||
// is O(n_our_connections) at best.
|
||||
c.gcSenders(connections)
|
||||
for conn := range selectedConnections {
|
||||
c.sendDown(conn, data)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *GossipChannel) SendDown(conn Connection, data GossipData) {
|
||||
connections := c.ourself.Connections()
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
c.gcSenders(connections)
|
||||
c.sendDown(conn, data)
|
||||
}
|
||||
|
||||
// GC - randomly (courtesy of go's map iterator) pick some existing
|
||||
// senders and stop&remove them if the associated connection is no
|
||||
// longer active. We stop as soon as we encounter a valid entry; the
|
||||
// idea being that when there is little or no garbage then this
|
||||
// executes close to O(1)[1], whereas when there is lots of garbage we
|
||||
// remove it quickly.
|
||||
//
|
||||
// [1] TODO Unfortunately, due to the desire to avoid nested locks,
|
||||
// instead of simply invoking LocalPeer.ConnectionTo(name), we pass in
|
||||
// the result of LocalPeer.Connections(). That is O(n_our_connections)
|
||||
// at best.
|
||||
func (c *GossipChannel) gcSenders(connections ConnectionSet) {
|
||||
for conn, sender := range c.senders {
|
||||
if _, found := connections[conn]; !found {
|
||||
delete(c.senders, conn)
|
||||
@@ -132,15 +147,6 @@ func (c *GossipChannel) Send(srcName PeerName, data GossipData) {
|
||||
break
|
||||
}
|
||||
}
|
||||
for conn := range selectedConnections {
|
||||
c.sendDown(conn, data)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *GossipChannel) SendDown(conn Connection, data GossipData) {
|
||||
c.Lock()
|
||||
c.sendDown(conn, data)
|
||||
c.Unlock()
|
||||
}
|
||||
|
||||
func (c *GossipChannel) sendDown(conn Connection, data GossipData) {
|
||||
|
||||
@@ -11,4 +11,3 @@ layout: default
|
||||
* [Troubleshooting](troubleshooting.html)
|
||||
* [Building](building.html)
|
||||
* [How it works](how-it-works.html)
|
||||
* [Contact information](https://github.com/weaveworks/weave#contact-us)
|
||||
@@ -161,9 +161,6 @@ The inverse operation can be carried out using the `dns-remove` command:
|
||||
$ weave dns-remove 10.2.1.27 $C
|
||||
```
|
||||
|
||||
When queried about a name with multiple IPs, weaveDNS returns a random
|
||||
result from the set of IPs available.
|
||||
|
||||
## <a name="hot-swapping"></a>Hot-swapping service containers
|
||||
|
||||
If you would like to deploy a new version of a service, keep the old
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
start_suite "Run docker-py test suite against the proxy"
|
||||
|
||||
docker_on $HOST1 pull joffrey/docker-py >/dev/null
|
||||
# workaround for https://github.com/docker/docker-py/issues/745
|
||||
docker_on $HOST1 pull busybox >/dev/null
|
||||
|
||||
weave_on $HOST1 launch-proxy --no-default-ipam
|
||||
|
||||
@@ -13,7 +15,7 @@ if docker_on $HOST1 run \
|
||||
-e DOCKER_HOST=tcp://172.17.42.1:12375 \
|
||||
-v /tmp:/tmp \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
joffrey/docker-py python tests/integration_test.py ; then
|
||||
joffrey/docker-py py.test tests/integration_test.py ; then
|
||||
assert_raises "true"
|
||||
else
|
||||
assert_raises "false"
|
||||
|
||||
@@ -1079,7 +1079,7 @@ case "$COMMAND" in
|
||||
# additional parameters, such as resource limits, to docker
|
||||
# when launching the weave container.
|
||||
DNS_CONTAINER=$(docker run --privileged -d --name=$DNS_CONTAINER_NAME \
|
||||
-p $DOCKER_BRIDGE_IP:53:53/udp \
|
||||
-p $DOCKER_BRIDGE_IP:53:53/udp -p $DOCKER_BRIDGE_IP:53:53/tcp \
|
||||
-e WEAVE_CIDR=none \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
$WEAVEDNS_DOCKER_ARGS $DNS_IMAGE -iface $CONTAINER_IFNAME -httpiface "$DNS_HTTP_IFNAME" "$@")
|
||||
@@ -1300,7 +1300,7 @@ case "$COMMAND" in
|
||||
conntrack -D -p udp --dport $PORT >/dev/null 2>&1 || true
|
||||
destroy_bridge
|
||||
for LOCAL_IFNAME in $(ip link show | grep v${CONTAINER_IFNAME}pl | cut -d ' ' -f 2 | tr -d ':') ; do
|
||||
ip link del $LOCAL_IFNAME
|
||||
ip link del $LOCAL_IFNAME >/dev/null 2>&1 || true
|
||||
done
|
||||
;;
|
||||
rmpeer)
|
||||
|
||||
Reference in new issue
Block a user