Merge branch '1.6'

This commit is contained in:
Adam Harrison committed 2016-08-18 11:32:43 +01:00
commit 2e825242cd
1 file changed
+7 -16
+7 -16
View File
@@ -689,7 +689,7 @@ init_fastdp() {
ip link set dev $DATAPATH mtu $MTU ip link set dev $DATAPATH mtu $MTU
} }
init_bridge() { init_bridge_prep() {
# Observe any MTU that is already set # Observe any MTU that is already set
[ -n "$MTU" ] || MTU=${WEAVE_MTU:-65535} [ -n "$MTU" ] || MTU=${WEAVE_MTU:-65535}
@@ -717,12 +717,17 @@ init_bridge() {
ip link del dev v${CONTAINER_IFNAME}du ip link del dev v${CONTAINER_IFNAME}du
} }
init_bridge() {
init_bridge_prep
create_veth $BRIDGE_IFNAME $PCAP_IFNAME add_iface_bridge $BRIDGE_IFNAME
}
init_bridged_fastdp() { init_bridged_fastdp() {
# Initialise the datapath as normal. NB sets MTU for use below # Initialise the datapath as normal. NB sets MTU for use below
init_fastdp init_fastdp
# Initialise the bridge using fast datapath MTU # Initialise the bridge using fast datapath MTU
init_bridge init_bridge_prep
# Create linking veth pair # Create linking veth pair
create_veth $BRIDGE_IFNAME $DATAPATH_IFNAME configure_veth_bridged_fastdp create_veth $BRIDGE_IFNAME $DATAPATH_IFNAME configure_veth_bridged_fastdp
@@ -853,18 +858,6 @@ ask_version() {
[ -n "$DOCKERIMAGE" ] && docker run --rm --net=none -e WEAVE_CIDR=none $3 $DOCKERIMAGE $COVERAGE_ARGS --version [ -n "$DOCKERIMAGE" ] && docker run --rm --net=none -e WEAVE_CIDR=none $3 $DOCKERIMAGE $COVERAGE_ARGS --version
} }
setup_router_iface_fastdp() {
true
}
setup_router_iface_bridge() {
create_veth $BRIDGE_IFNAME $PCAP_IFNAME add_iface_bridge $BRIDGE_IFNAME
}
setup_router_iface_bridged_fastdp() {
setup_router_iface_fastdp "$@"
}
container_in_host_ns() { container_in_host_ns() {
[ -h "$CONTAINER_NETNS" -a -h "/proc/self/ns/net" -a "$(readlink $CONTAINER_NETNS)" = "$(readlink /proc/self/ns/net)" ] [ -h "$CONTAINER_NETNS" -a -h "/proc/self/ns/net" -a "$(readlink $CONTAINER_NETNS)" = "$(readlink /proc/self/ns/net)" ]
} }
@@ -1673,7 +1666,6 @@ launch_router() {
--http-addr $HTTP_ADDR \ --http-addr $HTTP_ADDR \
--resolv-conf "/var/run/weave/etc/$RESOLV_CONF_BASE" \ --resolv-conf "/var/run/weave/etc/$RESOLV_CONF_BASE" \
"$@") "$@")
setup_router_iface_$BRIDGE_TYPE
wait_for_status $CONTAINER_NAME http_call $HTTP_ADDR wait_for_status $CONTAINER_NAME http_call $HTTP_ADDR
setup_awsvpc setup_awsvpc
populate_router populate_router
@@ -1993,7 +1985,6 @@ EOF
! docker inspect -f '{{.Config.Cmd}}' $CONTAINER_NAME | grep -q -- "--awsvpc" || AWSVPC=1 ! docker inspect -f '{{.Config.Cmd}}' $CONTAINER_NAME | grep -q -- "--awsvpc" || AWSVPC=1
create_bridge create_bridge
fetch_router_args fetch_router_args
setup_router_iface_$BRIDGE_TYPE
wait_for_status $CONTAINER_NAME http_call $HTTP_ADDR wait_for_status $CONTAINER_NAME http_call $HTTP_ADDR
setup_awsvpc setup_awsvpc
populate_router populate_router