ovn: configure ovn in ovsdb only on ovn-controller hosts

Based on some variables like tunnel_interface_address that are not present in nodes without ovn-controller like controller nodes this task will be failed because of undefined variable

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
Change-Id: Ic511bf6479438f9288a008afb2aae43083a4e69f
Closes-Bug: #1953367
This commit is contained in:
Seena Fallah 2021-12-06 19:17:45 +03:30
parent a338df77f1
commit e4af0c03d2
2 changed files with 8 additions and 0 deletions

View File

@ -33,3 +33,4 @@
- { name: ovn-bridge-mappings, value: "{{ ovn_mappings }}", state: "{{ 'present' if (inventory_hostname in groups['ovn-controller-network'] or computes_need_external_bridge | bool) else 'absent' }}" } - { name: ovn-bridge-mappings, value: "{{ ovn_mappings }}", state: "{{ 'present' if (inventory_hostname in groups['ovn-controller-network'] or computes_need_external_bridge | bool) else 'absent' }}" }
- { name: ovn-chassis-mac-mappings, value: "{{ ovn_macs }}", state: "{{ 'present' if inventory_hostname in groups['ovn-controller-compute'] else 'absent' }}" } - { name: ovn-chassis-mac-mappings, value: "{{ ovn_macs }}", state: "{{ 'present' if inventory_hostname in groups['ovn-controller-compute'] else 'absent' }}" }
- { name: ovn-cms-options, value: "{{ ovn_cms_opts }}", state: "{{ 'present' if ovn_cms_opts != '' else 'absent' }}" } - { name: ovn-cms-options, value: "{{ ovn_cms_opts }}", state: "{{ 'present' if ovn_cms_opts != '' else 'absent' }}" }
when: inventory_hostname in groups.get('ovn-controller', [])

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Only run ``configure ovn in ovsdb`` task on ovn-controller hosts
The task will fail on hosts (like controller nodes) without
tunnel interface
`LP#1953367 <https://bugs.launchpad.net/kolla-ansible/+bug/1953367>`__