devstack/playbooks/pre.yaml
Brian Haley 2bb62b43bf Decrease MTU to account for IPv6 header
(MTU - 50) only supports VxLAN over IPv4, decrease it
to support IPv6 as well, which is 20 bytes larger.

Change-Id: I0cf258770f628c1b4fb590bd274b5433fbcc1450
2020-11-06 17:34:53 -05:00

38 lines
1.5 KiB
YAML

- hosts: all
pre_tasks:
- name: Fix the permissions of the zuul home directory
# Make sure that the zuul home can be traversed,
# so that all users can access the sources placed there.
# Some distributions create it with 700 by default.
file:
path: "{{ ansible_user_dir }}"
mode: a+x
- name: Gather minimum local MTU
set_fact:
local_mtu: >
{% set mtus = [] -%}
{% for interface in ansible_interfaces -%}
{% set interface_variable = 'ansible_' + interface -%}
{% if interface_variable in hostvars[inventory_hostname] -%}
{% set _ = mtus.append(hostvars[inventory_hostname][interface_variable]['mtu']|int) -%}
{% endif -%}
{% endfor -%}
{{- mtus|min -}}
- name: Calculate external_bridge_mtu
# 30 bytes is overhead for vxlan (which is greater than GRE
# allowing us to use either overlay option with this MTU.
# 40 bytes is overhead for IPv6, which will also support an IPv4 overlay.
# TODO(andreaf) This should work, but it may have to be reconcilied with
# the MTU setting used by the multinode setup roles in multinode pre.yaml
set_fact:
external_bridge_mtu: "{{ local_mtu | int - 30 - 40 }}"
roles:
- configure-swap
- setup-stack-user
- setup-tempest-user
- setup-devstack-source-dirs
- setup-devstack-log-dir
- setup-devstack-cache
- start-fresh-logging
- write-devstack-local-conf