CI: Configure IP on a linux bridge instead of OVS br-ex
OVS upgrade jobs failed due to assigning an IP on the br-ex interface (which is recycled during OVS upgrade). This change introduces a bridge and veth pair for Neutron to use. Change-Id: Ib3bee6e810fb8d31552d4c72c2a1ccae382c51f0
This commit is contained in:
parent
1da7158021
commit
337771143b
12
roles/bridge/tasks/main.yml
Normal file
12
roles/bridge/tasks/main.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- name: Create bridge
|
||||||
|
become: true
|
||||||
|
command: ip link add {{ bridge_name }} type bridge
|
||||||
|
|
||||||
|
- name: Bring bridge interface up
|
||||||
|
become: true
|
||||||
|
command: ip link set {{ bridge_name }} up
|
||||||
|
|
||||||
|
- name: Add member interface to bridge
|
||||||
|
become: true
|
||||||
|
command: ip link set {{ bridge_member_name }} master {{ bridge_name }}
|
12
roles/veth/tasks/main.yml
Normal file
12
roles/veth/tasks/main.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- name: Create veth pair
|
||||||
|
become: true
|
||||||
|
command: ip link add {{ veth_pair.0 }} type veth peer name {{ veth_pair.1 }}
|
||||||
|
|
||||||
|
- name: Bring veth pair up
|
||||||
|
become: true
|
||||||
|
shell: ip link set {{ veth_pair.0 }} up && ip link set {{ veth_pair.1 }} up
|
||||||
|
|
||||||
|
- name: Add first veth pair port to bridge
|
||||||
|
become: true
|
||||||
|
command: ip link set {{ veth_pair.0 }} master {{ bridge_name }}
|
@ -13,19 +13,6 @@ function init_runonce {
|
|||||||
|
|
||||||
echo "Initialising OpenStack resources via init-runonce"
|
echo "Initialising OpenStack resources via init-runonce"
|
||||||
KOLLA_DEBUG=1 tools/init-runonce |& gawk '{ print strftime("%F %T"), $0; }' &> /tmp/logs/ansible/init-runonce
|
KOLLA_DEBUG=1 tools/init-runonce |& gawk '{ print strftime("%F %T"), $0; }' &> /tmp/logs/ansible/init-runonce
|
||||||
|
|
||||||
echo "Setting address on the external network bridge"
|
|
||||||
if [[ $SCENARIO == "linuxbridge" ]]; then
|
|
||||||
# NOTE(yoctozepto): linuxbridge agent manages its bridges by itself
|
|
||||||
# hence, we need to find the current name of the external network bridge
|
|
||||||
devname=$(basename $(readlink /sys/class/net/${EXT_NET_SLAVE_DEVICE}/master))
|
|
||||||
else
|
|
||||||
devname=br-ex
|
|
||||||
# NOTE(yoctozepto): ovs virtual interfaces are down (not used) by default
|
|
||||||
# hence, we need to bring the external network bridge up
|
|
||||||
sudo ip link set ${devname} up
|
|
||||||
fi
|
|
||||||
sudo ip addr add ${EXT_NET_LOCAL_ADDR} dev ${devname}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,8 +20,25 @@
|
|||||||
# because it is enslaved by a bridge
|
# because it is enslaved by a bridge
|
||||||
- role: multi-node-vxlan-overlay
|
- role: multi-node-vxlan-overlay
|
||||||
vars:
|
vars:
|
||||||
vxlan_interface_name: "{{ neutron_external_interface_name }}"
|
vxlan_interface_name: "{{ neutron_external_vxlan_interface_name }}"
|
||||||
vxlan_vni: 10001
|
vxlan_vni: 10001
|
||||||
|
- role: bridge
|
||||||
|
vars:
|
||||||
|
bridge_name: "{{ neutron_external_bridge_name }}"
|
||||||
|
bridge_member_name: "{{ neutron_external_vxlan_interface_name }}"
|
||||||
|
# TODO(mnasiadka): Update ipv6 jobs to test ipv6 in Neutron
|
||||||
|
- role: multi-node-managed-addressing
|
||||||
|
vars:
|
||||||
|
managed_interface_name: "{{ neutron_external_bridge_name }}"
|
||||||
|
managed_network_prefix: "{{ neutron_external_network_prefix }}"
|
||||||
|
managed_network_prefix_length: "{{ neutron_external_network_prefix_length }}"
|
||||||
|
managed_network_address_family: "ipv4"
|
||||||
|
- role: veth
|
||||||
|
vars:
|
||||||
|
veth_pair:
|
||||||
|
- "veth-{{ neutron_external_bridge_name }}"
|
||||||
|
- "veth-{{ neutron_external_bridge_name }}-ext"
|
||||||
|
bridge_name: "{{ neutron_external_bridge_name }}"
|
||||||
tasks:
|
tasks:
|
||||||
# NOTE(yoctozepto): we use gawk to add time to each logged line
|
# NOTE(yoctozepto): we use gawk to add time to each logged line
|
||||||
# outside of Ansible (e.g. for init-runonce)
|
# outside of Ansible (e.g. for init-runonce)
|
||||||
|
@ -374,8 +374,6 @@
|
|||||||
EXT_NET_CIDR: "{{ neutron_external_network_prefix }}0/{{ neutron_external_network_prefix_length }}"
|
EXT_NET_CIDR: "{{ neutron_external_network_prefix }}0/{{ neutron_external_network_prefix_length }}"
|
||||||
EXT_NET_RANGE: "start={{ neutron_external_network_prefix }}150,end={{ neutron_external_network_prefix }}199"
|
EXT_NET_RANGE: "start={{ neutron_external_network_prefix }}150,end={{ neutron_external_network_prefix }}199"
|
||||||
EXT_NET_GATEWAY: "{{ neutron_external_network_prefix }}1"
|
EXT_NET_GATEWAY: "{{ neutron_external_network_prefix }}1"
|
||||||
EXT_NET_LOCAL_ADDR: "{{ neutron_external_network_prefix }}1/{{ neutron_external_network_prefix_length }}"
|
|
||||||
EXT_NET_SLAVE_DEVICE: "{{ neutron_external_interface_name }}"
|
|
||||||
SCENARIO: "{{ scenario }}"
|
SCENARIO: "{{ scenario }}"
|
||||||
when: openstack_core_tested or scenario in ['ironic', 'magnum', 'scenario_nfv', 'zun', 'octavia']
|
when: openstack_core_tested or scenario in ['ironic', 'magnum', 'scenario_nfv', 'zun', 'octavia']
|
||||||
|
|
||||||
|
@ -37,7 +37,9 @@
|
|||||||
address_family: 'ipv4'
|
address_family: 'ipv4'
|
||||||
neutron_external_network_prefix: "198.51.100."
|
neutron_external_network_prefix: "198.51.100."
|
||||||
neutron_external_network_prefix_length: "24"
|
neutron_external_network_prefix_length: "24"
|
||||||
neutron_external_interface_name: vxlan1
|
neutron_external_bridge_name: br0
|
||||||
|
neutron_external_interface_name: "veth-{{ neutron_external_bridge_name }}-ext"
|
||||||
|
neutron_external_vxlan_interface_name: vxlan1
|
||||||
tls_enabled: false
|
tls_enabled: false
|
||||||
# NOTE(yoctozepto): Ansible on Debian defaults to /usr/bin/python which is
|
# NOTE(yoctozepto): Ansible on Debian defaults to /usr/bin/python which is
|
||||||
# python2. Let's use python3 instead as expected in 2020 and beyond.
|
# python2. Let's use python3 instead as expected in 2020 and beyond.
|
||||||
|
Loading…
Reference in New Issue
Block a user