Merge "Fix broken xenial job"

This commit is contained in:
Jenkins 2016-10-11 18:28:59 +00:00 committed by Gerrit Code Review
commit fd089b0a01
3 changed files with 13 additions and 1 deletions

View File

@ -955,7 +955,7 @@ function setup_qemu_log_hook {
function create_bridge_and_vms { function create_bridge_and_vms {
# Call libvirt setup scripts in a new shell to ensure any new group membership # 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 if [[ "$IRONIC_VM_LOG_CONSOLE" == "True" ]] ; then
local log_arg="-l $IRONIC_VM_LOG_DIR" local log_arg="-l $IRONIC_VM_LOG_DIR"

View File

@ -2,3 +2,12 @@ enable_service ironic ir-api ir-cond
# TODO(jroll) this hacks around a bug, remove when fixed in devstack # TODO(jroll) this hacks around a bug, remove when fixed in devstack
# https://bugs.launchpad.net/devstack/+bug/1629133 # https://bugs.launchpad.net/devstack/+bug/1629133
SUBNETPOOL_PREFIX_V4=$FIXED_RANGE 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))

View File

@ -12,6 +12,7 @@ LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}
# Keep track of the DevStack directory # Keep track of the DevStack directory
TOP_DIR=$(cd $(dirname "$0")/.. && pwd) TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
BRIDGE_NAME=${1:-brbm} BRIDGE_NAME=${1:-brbm}
PUBLIC_BRIDGE_MTU=${2:-1500}
export VIRSH_DEFAULT_CONNECT_URI="$LIBVIRT_CONNECT_URI" 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-define <(sed s/brbm/$BRIDGE_NAME/ $TOP_DIR/templates/brbm.xml)
virsh net-autostart ${BRIDGE_NAME} virsh net-autostart ${BRIDGE_NAME}
virsh net-start ${BRIDGE_NAME} virsh net-start ${BRIDGE_NAME}
sudo ip link set dev ${BRIDGE_NAME} mtu $PUBLIC_BRIDGE_MTU