Michal Nasiadka 06baf51440 ovn: Do not schedule SNAT routers on computes
Currently we set enable-chassis-as-gw on compute nodes when distributed FIP
is enabled - that is not required for FIP functionality.

Change-Id: Ic880a9479fa0cdbb1d1cae3dbe9523ef2e1132ce
Closes-Bug: #1901960
2020-11-09 11:48:15 +00:00

44 lines
1.8 KiB
YAML

---
- name: Create br-int bridge on OpenvSwitch
become: true
command: >
docker exec openvswitch_vswitchd ovs-vsctl --may-exist
add-br br-int -- set Bridge br-int fail-mode=secure
when: inventory_hostname in groups['ovn-controller']
- name: Set OVN encapsulation settings
become: true
command: >
docker exec openvswitch_vswitchd ovs-vsctl set Open_vSwitch .
external_ids:ovn-encap-ip={{ tunnel_interface_address }}
external_ids:ovn-encap-type=geneve
external_ids:ovn-remote={{ ovn_sb_connection }}
when: inventory_hostname in groups['ovn-controller']
- name: Set OVN bridge mappings
vars:
ovn_mappings: "{% for bridge in neutron_bridge_name.split(',') %}physnet{{ loop.index0 + 1 }}:{{ bridge }}{% if not loop.last %},{% endif %}{% endfor %}"
become: true
command: docker exec openvswitch_vswitchd ovs-vsctl set Open_vSwitch . external_ids:ovn-bridge-mappings={{ ovn_mappings }}
when:
- inventory_hostname in groups["ovn-controller-network"]
or (inventory_hostname in groups["ovn-controller-compute"] and computes_need_external_bridge | bool)
- name: Enable chassis as gateway
become: true
command: docker exec openvswitch_vswitchd ovs-vsctl set Open_vSwitch . external-ids:ovn-cms-options="enable-chassis-as-gw"
when: inventory_hostname in groups["ovn-controller-network"]
- name: Ensure chassis as gateway is disabled where required
become: true
command: docker exec openvswitch_vswitchd ovs-vsctl remove Open_vSwitch . external-ids ovn-cms-options
when: inventory_hostname not in groups["ovn-controller-network"]
- name: Set OVN remote probe interval
become: true
command: >
docker exec openvswitch_vswitchd ovs-vsctl set Open_vSwitch .
external_ids:ovn-remote-probe-interval={{ ovn_remote_probe_interval }}
when:
- inventory_hostname in groups["ovn-controller"]