summaryrefslogtreecommitdiff
path: root/devstack
diff options
context:
space:
mode:
authorVasyl Saienko <vsaienko@mirantis.com>2016-10-10 20:25:05 +0300
committerVasyl Saienko <vsaienko@mirantis.com>2016-10-11 15:04:24 +0300
commite7190eac30c8a03e92262d339e6625572c7b76eb (patch)
tree890acfa21ccfd6e79d8c52cfcf2923053e7f64e5 /devstack
parent5194f4181b2d9b4caffc85d5873ecf1143f972a1 (diff)
downloadironic-e7190eac30c8a03e92262d339e6625572c7b76eb.tar.gz
Fix broken xenial job
MTU has been changed in neutron to 1450 by default by [0] As result ISCSI job on xenial become broken. With this patch PUBLIC_BRIDGE_MTU is set to smallest mtu of existed interfaces decreased by 50. MTU on IRONIC_VM_NETWORK_BRIDGE is set to PUBLIC_BRIDGE_MTU. [0] https://github.com/openstack/neutron/commit/51a697817da849c8f9dae9651f17cd863e170fdc Closes-Bug: #1631875 Related-Bug: #1603268 Change-Id: I044d415410a714591e9770a57cfb8509a103cf00
Diffstat (limited to 'devstack')
-rw-r--r--devstack/lib/ironic2
-rw-r--r--devstack/settings9
-rwxr-xr-xdevstack/tools/ironic/scripts/setup-network.sh3
3 files changed, 13 insertions, 1 deletions
diff --git a/devstack/lib/ironic b/devstack/lib/ironic
index d1b5b7de5..c4584fde4 100644
--- a/devstack/lib/ironic
+++ b/devstack/lib/ironic
@@ -955,7 +955,7 @@ function setup_qemu_log_hook {
function create_bridge_and_vms {
# Call libvirt setup scripts in a new shell to ensure any new group membership
- sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/setup-network.sh $IRONIC_VM_NETWORK_BRIDGE"
+ sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/setup-network.sh $IRONIC_VM_NETWORK_BRIDGE $PUBLIC_BRIDGE_MTU"
if [[ "$IRONIC_VM_LOG_CONSOLE" == "True" ]] ; then
local log_arg="-l $IRONIC_VM_LOG_DIR"
diff --git a/devstack/settings b/devstack/settings
index f9ad9e655..726919de3 100644
--- a/devstack/settings
+++ b/devstack/settings
@@ -2,3 +2,12 @@ enable_service ironic ir-api ir-cond
# TODO(jroll) this hacks around a bug, remove when fixed in devstack
# https://bugs.launchpad.net/devstack/+bug/1629133
SUBNETPOOL_PREFIX_V4=$FIXED_RANGE
+
+# NOTE(vsaienko) mtu calculation has been changed recently to 1450
+# https://github.com/openstack/neutron/commit/51a697
+# and caused https://bugs.launchpad.net/ironic/+bug/1631875
+# Get the smallest local MTU
+local_mtu=$(ip link show | sed -ne 's/.*mtu \([0-9]\+\).*/\1/p' | sort -n | head -1)
+# 50 bytes is overhead for vxlan (which is greater than GRE
+# allowing us to use either overlay option with this MTU.
+PUBLIC_BRIDGE_MTU=$((local_mtu - 50))
diff --git a/devstack/tools/ironic/scripts/setup-network.sh b/devstack/tools/ironic/scripts/setup-network.sh
index fc60da082..3eb6ed80b 100755
--- a/devstack/tools/ironic/scripts/setup-network.sh
+++ b/devstack/tools/ironic/scripts/setup-network.sh
@@ -12,6 +12,7 @@ LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}
# Keep track of the DevStack directory
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
BRIDGE_NAME=${1:-brbm}
+PUBLIC_BRIDGE_MTU=${2:-1500}
export VIRSH_DEFAULT_CONNECT_URI="$LIBVIRT_CONNECT_URI"
@@ -26,3 +27,5 @@ sudo ip link set dev ${BRIDGE_NAME} up
virsh net-define <(sed s/brbm/$BRIDGE_NAME/ $TOP_DIR/templates/brbm.xml)
virsh net-autostart ${BRIDGE_NAME}
virsh net-start ${BRIDGE_NAME}
+
+sudo ip link set dev ${BRIDGE_NAME} mtu $PUBLIC_BRIDGE_MTU