From a40dfaffbd5297e9dae10ff871b62fbfde979830 Mon Sep 17 00:00:00 2001 From: gcalvino Date: Mon, 7 May 2018 10:31:04 +0200 Subject: [PATCH] Change docker overlay gw MTU Signed-off-by: gcalvino Change-Id: I43c529bfe160ed7fac032a6984ea8a3f3ea4606e --- installers/install_osm.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/installers/install_osm.sh b/installers/install_osm.sh index 2cd7b59a..7cdf8bc4 100755 --- a/installers/install_osm.sh +++ b/installers/install_osm.sh @@ -576,6 +576,11 @@ function generate_docker_env_files() { function deploy_lightweight() { echo "Deploying lightweight build" + if [ "${DEFAULT_MTU}" != "1500" ]; then + DOCKER_NETS=`sg docker -c "docker network list" | awk '{print $2}' | egrep -v "^ID$" | paste -d " " -s` + DOCKER_GW_NET=`sg docker -c "docker network inspect ${DOCKER_NETS}" | grep Subnet | awk -F\" '{print $4}' | egrep "^172" | sort -u | tail -1 | awk -F\. '{if ($2 != 255) print $1"."$2+1"."$3"."$4; else print "-1";}'` + sg docker -c "docker network create --subnet ${DOCKER_GW_NET} --opt com.docker.network.bridge.name=docker_gwbridge --opt com.docker.network.bridge.enable_icc=false --opt com.docker.network.bridge.enable_ip_masquerade=true --opt com.docker.network.driver.mtu=${DEFAULT_MTU} docker_gwbridge" + fi newgrp docker << EONG docker swarm init --advertise-addr ${DEFAULT_IP} docker network create --driver=overlay --attachable --opt com.docker.network.driver.mtu=${DEFAULT_MTU} netOSM -- 2.25.1