Compare commits

...
22 Commits
Author SHA1 Message Date
Adam Harrison 0aac614c08 Add release v1.6.2 2016-09-21 16:18:03 +01:00
Adam Harrison cd4cbed5a0 Merge pull request #2501 from weaveworks/issues/2495-filter-empty-peers
Reject empty peers
2016-09-21 11:12:10 +01:00
Adam Harrison 7a81bc2ddc Merge pull request #2510 from weaveworks/issues/2329-fix-830-flakiness
Enable unsolicited ARPs in 830 test suite
2016-09-20 17:17:19 +01:00
Martynas Pumputis 6df2782d73 Update weaveworks/mesh submodule 2016-09-20 17:03:38 +01:00
Adam Harrison 3fc7efa536 Merge pull request #2498 from weaveworks/broken-link
fixed broken link to command line args
2016-09-20 16:40:06 +01:00
Adam Harrison 71e43c2023 Merge pull request #2511 from weaveworks/issues/2340-make-640-less-flaky
Filter out netns of non-existing containers
2016-09-20 15:52:54 +01:00
Bryan Boreham 370f258c3a Fix outdated option ipam-seed 2016-09-16 15:53:43 -07:00
Martynas Pumputis 9b32bc2ab3 Close opened netns 2016-09-14 16:47:40 +01:00
Martynas Pumputis fd5e1970e1 Return nil netdev if netns of container cannot be found
The change applies to GetNetDevsWithPredicate. The function calls
FindNetDevs which already does the same filtering.

The change prevents from "container-addrs" (weaveutil) returning
"unable to open X process namespace" error which happens when
a container dies while the cmd is being executed.
2016-09-14 16:47:16 +01:00
Martynas Pumputis a1de7f3eef Enable unsolicited ARPs in 830 test case
Otherwise, ping (c1->c3) after the address reuse might time out.
2016-09-14 11:05:00 +01:00
Matthias Radestock c720ebec02 Merge pull request #2502 from weaveworks/issues/2469-supply-subnet
Pass in default subnet when creating 'weave' plugin network.

Fixes #2469.
2016-09-08 12:49:01 +01:00
Matthias Radestock 6a528409ab Merge pull request #2504 from weaveworks/check-tx-off
Check current tx value before trying to set it
2016-09-08 12:32:15 +01:00
Bryan Boreham c69e140e9e Check current tx value before trying to set it 2016-09-08 10:20:35 +01:00
Anita Buehrle 8ed0c13645 removed broken link 2016-09-06 14:36:25 +01:00
Anita Buehrle b635f9a994 fixed broken link to command line args 2016-09-06 14:36:25 +01:00
Bryan Boreham ac4246e1f5 Pass in default subnet when creating 'weave' plugin network.
New behaviour in Docker 1.12 means it disregards a plugin-supplied
address pool that overlaps an existing route, which causes a hang as
noted in #2469. When we pass in the subnet, Docker believes we really
do want that address range and avoids the hang.
2016-09-06 12:05:51 +01:00
Matthias Radestock 3d12e8088e Merge pull request #2491 from weaveworks/switch-ci-14.04
Switch CircleCI build VM to 14.04
2016-09-05 12:49:25 +01:00
Martynas Pumputis aee35b34fe Pin joffrey/docker-py image to 1.8.1 vsn
The latest image requires 1.12.x dockerd.
2016-09-05 14:30:49 +03:00
Martynas Pumputis c06ccb3b0d Change owner of /usr/local/go on build VM
Otherwise "go get -tags netgo" fails with the permission denied error.
2016-09-05 14:30:49 +03:00
Martynas Pumputis 268bb656fc Do not fetch Google Cloud SDK
As it is already installed on CircleCI 14.04 build VMs
2016-09-05 14:30:49 +03:00
Martynas Pumputis a335c419ec Fix typo 2016-09-05 13:27:49 +03:00
Martynas Pumputis 48c9547943 Update CHANGELOG.md 2016-08-19 14:11:57 +01:00
13 changed files with 64 additions and 33 deletions

No files matched your search

+12 -2
View File
@@ -1,14 +1,24 @@
## Release 1.6.2
Bug fixes and minor improvements
* Fixed hang after stopping and restarting on Docker 1.12 #2469/#2502
* Avoid an error on Google container images by checking for tx offload support #2504
* Fixed an issue where the supplied peer list could be ignored when restarting after failure #2503/#2509
* Check for empty peer name on launch #2495/#2501
More details in the [change log](https://github.com/weaveworks/weave/issues?q=milestone%3A1.6.2).
## Release 1.6.1
Bug fixes and minor improvements
* `weave ps` was occasionally failing to list allocated addresses of containers #2388/#2418
* `weave ps` was occasionally failing to list allocated addresses of containers #2388/#2418/#2445
* `weave launch[-router]` on 4.2 kernel would appear to succeed even if the fast datapath VXLAN UDP port was in use by a different process #2375/#2474
* Launching the proxy would fail when the Docker daemon could not be detected #2457/#2424
* The CNI plugin did not work with Apache Mesos #2394/#2442
* Router stopped working after a restart in the AWSVPC mode #2381/#2409
* Router crashed when the Docker API endpoint parameter was explicitly set to empty #2421/#2467
* `weave ps` returned no error when the router was down #2445
* The CNI plugin did not work on recent versions of Docker for Mac #2434/#2442
* The CNI plugin assigns an IP to the bridge if necessary, which avoids failures if `weave expose` has not run yet #2471
* Distinguish peer name collisions from attempts to connect to self in logs #2460
+2 -2
View File
@@ -10,7 +10,7 @@ machine:
environment:
GOPATH: /home/ubuntu:$GOPATH
SRCDIR: /home/ubuntu/src/github.com/weaveworks/weave
PATH: $PATH:$HOME/.local/bin:$HOME/google-cloud-sdk/bin/
PATH: $PATH:$HOME/.local/bin
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
dependencies:
@@ -18,13 +18,13 @@ dependencies:
- "~/docker"
post:
- "sudo apt-get update && sudo apt-get install bc jq"
- curl https://sdk.cloud.google.com | bash
- bin/setup-circleci-secrets "$SECRET_PASSWORD"
- "mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR"
- "cd $SRCDIR; git submodule update --init"
- cd $SRCDIR/test; ./gce.sh make_template:
parallel: false
- "cd $SRCDIR/build; ../tools/rebuild-image weaveworks/weavebuild . Dockerfile build.sh && touch $SRCDIR/.build.uptodate"
- "sudo chown -R ubuntu /usr/local/go"
test:
override:
+5
View File
@@ -130,10 +130,15 @@ func GetNetDevsWithPredicate(processID int, predicate func(link netlink.Link) bo
if err != nil {
return nil, fmt.Errorf("unable to open root namespace: %s", err)
}
defer nsToplevel.Close()
nsContainr, err := netns.GetFromPid(processID)
if err != nil {
if os.IsNotExist(err) {
return nil, nil
}
return nil, fmt.Errorf("unable to open process %d namespace: %s", processID, err)
}
defer nsContainr.Close()
if nsToplevel.Equal(nsContainr) {
return nil, nil
}
+20 -12
View File
@@ -6,6 +6,7 @@ import "unsafe"
const (
SIOCETHTOOL = 0x8946 // linux/sockios.h
ETHTOOL_GTXCSUM = 0x00000016 // linux/ethtool.h
ETHTOOL_STXCSUM = 0x00000017 // linux/ethtool.h
IFNAMSIZ = 16 // linux/if.h
)
@@ -22,31 +23,38 @@ type EthtoolValue struct {
Data uint32
}
func ioctlEthtool(fd int, argp uintptr) error {
_, _, errno := syscall.RawSyscall(syscall.SYS_IOCTL, uintptr(fd), uintptr(SIOCETHTOOL), argp)
if errno != 0 {
return errno
}
return nil
}
// Disable TX checksum offload on specified interface
func EthtoolTXOff(name string) error {
if len(name)+1 > IFNAMSIZ {
return fmt.Errorf("name too long")
}
value := EthtoolValue{ETHTOOL_STXCSUM, 0}
request := IFReqData{Data: uintptr(unsafe.Pointer(&value))}
copy(request.Name[:], name)
socket, err := syscall.Socket(syscall.AF_INET, syscall.SOCK_DGRAM, 0)
if err != nil {
return err
}
defer syscall.Close(socket)
_, _, errno := syscall.RawSyscall(syscall.SYS_IOCTL,
uintptr(socket),
uintptr(SIOCETHTOOL),
uintptr(unsafe.Pointer(&request)))
// Request current value
value := EthtoolValue{Cmd: ETHTOOL_GTXCSUM}
request := IFReqData{Data: uintptr(unsafe.Pointer(&value))}
copy(request.Name[:], name)
if errno != 0 {
return errno
if err := ioctlEthtool(socket, uintptr(unsafe.Pointer(&request))); err != nil {
return err
}
if value.Data == 0 { // if already off, don't try to change
return nil
}
return nil
value = EthtoolValue{ETHTOOL_STXCSUM, 0}
return ioctlEthtool(socket, uintptr(unsafe.Pointer(&request)))
}
+8 -4
View File
@@ -10,11 +10,12 @@ import (
)
func createPluginNetwork(args []string) error {
if len(args) != 2 {
cmdUsage("create-plugin-network", "<network-name> <driver-name>")
if len(args) != 3 {
cmdUsage("create-plugin-network", "<network-name> <driver-name> <default-subnet>")
}
networkName := args[0]
driverName := args[1]
subnet := args[2]
d, err := newDockerClient()
if err != nil {
return err
@@ -24,8 +25,11 @@ func createPluginNetwork(args []string) error {
Name: networkName,
CheckDuplicate: true,
Driver: driverName,
IPAM: docker.IPAMOptions{Driver: driverName},
Options: map[string]interface{}{plugin.MulticastOption: "true"},
IPAM: docker.IPAMOptions{
Driver: driverName,
Config: []docker.IPAMConfig{{Subnet: subnet}},
},
Options: map[string]interface{}{plugin.MulticastOption: "true"},
})
if err != docker.ErrNetworkAlreadyExists && err != nil {
// Despite appearances to the contrary, CreateNetwork does
+1 -1
View File
@@ -202,4 +202,4 @@ named `weavedb` is used to store this data.
**See Also**
* [Automatic Allocation Across Multiple Subnets](/site/ipam/allocation-multi-ipam.md)
* [Plugin Command-line Arguments](/site/plugin/plug-in-command-line.md)
* [Integrating Docker via the Network Plugin](/site/plugin.md)
+1 -1
View File
@@ -52,7 +52,7 @@ following command on any peer:
weave status ipam
This command displays the peer names and nicknames, absolute quantity/percentage of allocation
range managed by peer and also identifies the names of unreachable peers. If you are satisifed
range managed by peer and also identifies the names of unreachable peers. If you are satisfied
that the peer is truly gone, rather than temporarily unreachable due to a
partition, you can reclaim their space manually.
@@ -46,14 +46,14 @@ Where
On each new peer, at boot, via
[systemd](/site/installing-weave/systemd.md):
hostN$ weave launch --no-restart --name ::N --ipam-seed $SEED $PEERS
hostN$ weave launch --no-restart --name ::N --ipalloc-init seed=$SEED $PEERS
Where,
* `--no-restart` disables the Docker restart policy, since this will be
handled by systemd.
* `--name` specifies a unique name for this new peer.
* `--ipam-seed` specifies the names of only those peers that were
* `--ipalloc-init seed` specifies the names of only those peers that were
involved in the initial cluster bootstrap - even if they have been
subsequently removed from the cluster. You can view this as a kind
of 'cluster identity',where peers may only interoperate in the same
+1 -2
View File
@@ -38,6 +38,5 @@ The plugin accepts the following options via `docker network create ... --opt`:
**See Also**
* [Using the Weave Net Docker Network Plugin](/site/plugin.md)
* [Plugin Command-line Arguments](/site/plugin/plug-in-command-line.md)
* [Integrating Docker via the Network Plugin](/site/plugin.md)
+5 -3
View File
@@ -3,6 +3,8 @@
. ./config.sh
IMAGE="joffrey/docker-py:1.8.1"
docker_py_test() {
SHARD=$1
TOTAL_SHARDS=$2
@@ -12,9 +14,9 @@ docker_py_test() {
# 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
docker_on $HOST1 pull joffrey/docker-py >/dev/null
docker_on $HOST1 pull $IMAGE >/dev/null
CANDIDATES=$(docker_on $HOST1 run \
joffrey/docker-py \
$IMAGE \
py.test --collect-only tests/integration/ \
| sed -En "s/\s*<Module '([[:print:]]+)'>/\1/p")
@@ -36,7 +38,7 @@ docker_py_test() {
-e DOCKER_HOST=tcp://$DOCKER_BRIDGE_IP:12375 \
-v /tmp:/tmp \
-v /var/run/docker.sock:/var/run/docker.sock \
joffrey/docker-py py.test $TESTS ; then
$IMAGE py.test $TESTS ; then
assert_raises "true"
else
assert_raises "false"
+4 -2
View File
@@ -16,8 +16,10 @@ run_on $HOST1 sudo mkdir -p /opt/cni/bin
weave_on $HOST1 setup-cni
weave_on $HOST1 launch
C1=$(docker_on $HOST1 run --net=none --name=c1 -dt $SMALL_IMAGE /bin/sh)
C1=$(docker_on $HOST1 run --net=none --privileged --name=c1 -dt $SMALL_IMAGE /bin/sh)
C2=$(docker_on $HOST1 run --net=none --name=c2 -dt $SMALL_IMAGE /bin/sh)
# Enable unsolicited ARPs so that ping after the address reuse does not time out
exec_on $HOST1 c1 sysctl -w net.ipv4.conf.all.arp_accept=1
cni_connect $HOST1 c1 <<EOF
{
@@ -25,6 +27,7 @@ cni_connect $HOST1 c1 <<EOF
"type": "weave-net"
}
EOF
cni_connect $HOST1 c2 <<EOF
{
"name": "weave",
@@ -44,7 +47,6 @@ assert_raises "exec_on $HOST1 c2 $PING $C1IP"
# Now remove and start a new container to see if IP address re-use breaks things
docker_on $HOST1 rm -f c2
sleep 2
docker_on $HOST1 run --net=none --name=c3 -dt $SMALL_IMAGE /bin/sh
+2 -1
View File
@@ -1782,7 +1782,8 @@ launch_plugin_if_not_running() {
return 1
fi
wait_for_status $PLUGIN_CONTAINER_NAME http_call_unix $PLUGIN_CONTAINER_NAME status.sock
util_op create-plugin-network weave weavemesh
WEAVE_IPAM_SUBNET=$(call_weave GET /ipinfo/defaultsubnet)
util_op create-plugin-network weave weavemesh $WEAVE_IPAM_SUBNET
}
plugin_disabled() {