From 31a95c085fc1a5ce8a57ff834386b022ae087e24 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Mon, 3 Aug 2020 16:58:05 +0200 Subject: [PATCH] Use ebtables-legacy on Ubuntu Focal On Ubuntu 20.04 there is by default ebtables-nft used. The problem with that is that nftables don't supports syntax for source and destination ipv4 address in arp tables right now. So to workaround/fix this problem at least in our gate jobs we have to switch to ebtables-legacy for now. And that's exactly what this patch is doing. Change-Id: I0aca119f1feca1d8f31a0104dde40d5d52c1b25c Closes-Bug: #1889779 --- playbooks/configure_ebtables.yaml | 5 +++++ playbooks/configure_functional_job.yaml | 3 +++ roles/legacy_ebtables/tasks/main.yaml | 16 ++++++++++++++++ zuul.d/tempest-singlenode.yaml | 1 + 4 files changed, 25 insertions(+) create mode 100644 playbooks/configure_ebtables.yaml create mode 100644 roles/legacy_ebtables/tasks/main.yaml diff --git a/playbooks/configure_ebtables.yaml b/playbooks/configure_ebtables.yaml new file mode 100644 index 00000000000..f955177d248 --- /dev/null +++ b/playbooks/configure_ebtables.yaml @@ -0,0 +1,5 @@ +- hosts: all + roles: + # TODO(slaweq): remove it when nftables will support syntax for src and + # destination IP addresses in arp tables: + - legacy_ebtables diff --git a/playbooks/configure_functional_job.yaml b/playbooks/configure_functional_job.yaml index c663b786376..d44c4febd7d 100644 --- a/playbooks/configure_functional_job.yaml +++ b/playbooks/configure_functional_job.yaml @@ -1,5 +1,8 @@ - hosts: all roles: - ensure-tox + # TODO(slaweq): remove it when nftables will support syntax for src and + # destination IP addresses in arp tables: + - legacy_ebtables - setup_logdir - configure_functional_tests diff --git a/roles/legacy_ebtables/tasks/main.yaml b/roles/legacy_ebtables/tasks/main.yaml new file mode 100644 index 00000000000..e33dedee2c3 --- /dev/null +++ b/roles/legacy_ebtables/tasks/main.yaml @@ -0,0 +1,16 @@ +- name: Ensure legacy ebtables is installed + package: + name: 'ebtables' + state: latest + become: yes + +- name: Switch to legacy ebtables + shell: + cmd: /usr/bin/update-alternatives --set ebtables /usr/sbin/ebtables-legacy + executable: /bin/bash + become: yes + when: + - ansible_facts['distribution_release'] == "focal" + - ansible_facts['distribution'] == "Ubuntu" + + diff --git a/zuul.d/tempest-singlenode.yaml b/zuul.d/tempest-singlenode.yaml index 04a3c643a81..711aef39cc4 100644 --- a/zuul.d/tempest-singlenode.yaml +++ b/zuul.d/tempest-singlenode.yaml @@ -8,6 +8,7 @@ - openstack/devstack-gate - openstack/neutron - openstack/tempest + pre-run: playbooks/configure_ebtables.yaml vars: tempest_concurrency: 4 devstack_localrc: