Skip to content

Commit 2f062e3

Browse files
mnasiadkabbezak
authored andcommitted
ovn: make DVR work on VLAN tenant networks
In order for DVR to work on VLAN tenant networks we need to configure external_ids:ovn-chassis-mac-mappings with per node generated MAC [1] on computes [1]. This cherrypick is a stable/victoria version of 780919 change [2] [1]: ovn-org/ovn@1fed74c [2]: https://review.opendev.org/c/openstack/kolla-ansible/+/780919 Co-Authored-By: Bartosz Bezak <[email protected]> Depends-On: https://review.opendev.org/c/openstack/neutron/+/785131 Change-Id: I3a3ccde5b9ef2afb4c3e9206f13827687880cb57 (cherry picked from commit aff9935)
1 parent 570f46d commit 2f062e3

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

ansible/roles/ovn/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,7 @@ ovn_sb_db_extra_volumes: "{{ ovn_extra_volumes }}"
8888
#####
8989
# OVN
9090
#####
91+
# Base MAC for ovn-chassis-mac-mappings generation
92+
ovn_base_mac: "52:54:00"
9193
# Configure OVN remote probe interval time in ms
9294
ovn_remote_probe_interval: "60000"

ansible/roles/ovn/tasks/bootstrap.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@
3636
- inventory_hostname in groups["openvswitch"]
3737
- inventory_hostname not in groups["ovn-controller-network"]
3838

39+
- name: Set OVN chassis mac mappings
40+
vars:
41+
ovn_macs: "{% for bridge in neutron_bridge_name.split(',') %}physnet{{ loop.index0 + 1 }}:{{ ovn_base_mac | random_mac(seed=inventory_hostname+bridge) }}{% if not loop.last %},{% endif %}{% endfor %}"
42+
become: true
43+
command: docker exec openvswitch_vswitchd ovs-vsctl set Open_vSwitch . external_ids:ovn-chassis-mac-mappings={{ ovn_macs }}
44+
when:
45+
- inventory_hostname in groups["ovn-controller-compute"]
46+
3947
- name: Set OVN remote probe interval
4048
become: true
4149
command: >
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
features:
3+
- |
4+
OVN deployment will now configure ``external_ids:ovn-chassis-mac-mappings``
5+
to make DVR work on VLAN tenant networks.

0 commit comments

Comments
 (0)