From cecdb6a175eb8fe1bfff1d9321d06b7ba59990b1 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 25 Jun 2020 10:24:22 +0200 Subject: [PATCH] openvswitch: Use ansible_hostname for system-id Currently openvswitch sets system-id based on inventory_hostname, but when Ansible inventory contains ip addresses - then it will only take first ip octet - resulting in multiple OVN chassis being named i.e. "10". Then Neutron and OVN have problems functioning, because a chassis named "10" will be created and deleted multiple times per second - this ends up in ovsdb and neutron-server processes using up to 100% CPU. Adding openvswitch role to ovn CI job triggers. Change-Id: Id22eb3e74867230da02543abd93234a5fb12b31d Closes-Bug: #1884734 --- ansible/roles/openvswitch/defaults/main.yml | 2 +- releasenotes/notes/bug-1884734-ec054799d3300778.yaml | 10 ++++++++++ zuul.d/base.yaml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-1884734-ec054799d3300778.yaml diff --git a/ansible/roles/openvswitch/defaults/main.yml b/ansible/roles/openvswitch/defaults/main.yml index b22283050d..f07c37e2e5 100644 --- a/ansible/roles/openvswitch/defaults/main.yml +++ b/ansible/roles/openvswitch/defaults/main.yml @@ -75,4 +75,4 @@ openvswitch_vswitchd_extra_volumes: "{{ openvswitch_extra_volumes }}" # OpenvSwitch ############# -openvswitch_system_id: "{{ inventory_hostname_short }}" +openvswitch_system_id: "{{ ansible_hostname }}" diff --git a/releasenotes/notes/bug-1884734-ec054799d3300778.yaml b/releasenotes/notes/bug-1884734-ec054799d3300778.yaml new file mode 100644 index 0000000000..ac7da0997e --- /dev/null +++ b/releasenotes/notes/bug-1884734-ec054799d3300778.yaml @@ -0,0 +1,10 @@ +--- +fixes: + - | + Fixes an issue when using ip addresses instead of hostnames in Ansible + inventory. OpenvSwitch role sets system-id based on inventory_hostname, + which in case of ip addresses in is first ip octet. + Such a deployment would result in multiple OVN chassis with duplicate name + e.g. "10" connecting to OVN Southbound database - which spawns high numbers + of create/delete events in Encap database table - leading to near 100% CPU + usage of OVN/OVS/Neutron processes. diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 6ac0cc215d..100cb7a330 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -168,7 +168,7 @@ parent: kolla-ansible-base voting: false files: - - ^ansible/roles/(ovn|neutron)/ + - ^ansible/roles/(neutron|openvswitch|ovn)/ - ^tests/test-ovn.sh - ^tests/test-core-openstack.sh vars: