diff --git a/ansible/roles/ovn/defaults/main.yml b/ansible/roles/ovn/defaults/main.yml index 58c26bb6f8..e9cea8c66f 100644 --- a/ansible/roles/ovn/defaults/main.yml +++ b/ansible/roles/ovn/defaults/main.yml @@ -88,5 +88,7 @@ ovn_sb_db_extra_volumes: "{{ ovn_extra_volumes }}" ##### # OVN ##### +# Base MAC for ovn-chassis-mac-mappings generation +ovn_base_mac: "52:54:00" # Configure OVN remote probe interval time in ms ovn_remote_probe_interval: "60000" diff --git a/ansible/roles/ovn/tasks/bootstrap.yml b/ansible/roles/ovn/tasks/bootstrap.yml index 86e383cd51..68d57d796e 100644 --- a/ansible/roles/ovn/tasks/bootstrap.yml +++ b/ansible/roles/ovn/tasks/bootstrap.yml @@ -12,6 +12,7 @@ - name: Configure OVN in OVSDB vars: ovn_mappings: "{% for bridge in neutron_bridge_name.split(',') %}physnet{{ loop.index0 + 1 }}:{{ bridge }}{% if not loop.last %},{% endif %}{% endfor %}" + 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 %}" ovn_cms_opts: "{{ 'enable-chassis-as-gw' if inventory_hostname in groups['ovn-controller-network'] else '' }}" become: true kolla_toolbox: @@ -30,4 +31,5 @@ - { name: ovn-remote, value: "{{ ovn_sb_connection }}" } - { name: ovn-remote-probe-interval, value: "{{ ovn_remote_probe_interval }}" } - { 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-cms-options, value: "{{ ovn_cms_opts }}", state: "{{ 'present' if ovn_cms_opts != '' else 'absent' }}" } diff --git a/releasenotes/notes/ovn_dvr_vlan-f36a6868cfd4776e.yaml b/releasenotes/notes/ovn_dvr_vlan-f36a6868cfd4776e.yaml new file mode 100644 index 0000000000..8bc8e382c2 --- /dev/null +++ b/releasenotes/notes/ovn_dvr_vlan-f36a6868cfd4776e.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + OVN deployment will now configure ``external_ids:ovn-chassis-mac-mappings`` + to make DVR work on VLAN tenant networks.