aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/patches/salt-formula-linux/0001-Set-ovs-bridges-as-L3-interfaces.patch
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-01-25 21:28:27 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-01-27 20:07:55 +0100
commitac7fd699468ad9a02b250e5ef890aff8a03ce1bf (patch)
tree5179b8dee6790b04f72849558745ba2bde251eb6 /mcp/patches/salt-formula-linux/0001-Set-ovs-bridges-as-L3-interfaces.patch
parent30f1a9046ec688c0813ae8676aba2dbd6e5738f6 (diff)
[ovs] Start ovs services before networking
Fix broken systemd service unit dependecies: - OVS should start before networking service; - OVS ports & bridges should not be automatically ifup-ed by networking service to avoid races, so drop 'auto' for both (OVS ports are automatically handled when part of an OVS bridge); - explicitly ifup OVS bridges as part of networking service, but after all Linux interfaces have been handled; - use 'allow-ovs br-prv' to let OVS handle br-prv and avoid another race condition; While at it, fix some other related issues: - make OVS service start after DPDK service (if present); - bump OVS-DPDK compute VMs RAM since since switching from MTU 1500 to jumbo frames for virtual PODs a while ago failed to do so [1]; - avoid creating conflicting reclass linux.network.interfaces entries for OVS ports by using their name (drop 'ovs_port_' prefix): * for untagged networks they will override existing common defs; * for tagged networks, they will create separate entries; - DPDK scenarios: make gtw01 br-prv members OVS ports to avoid race conditions after node reboot by letting OVS handle them; [1] https://developers.redhat.com/blog/2018/03/16/\ ovs-dpdk-hugepage-memory/ Change-Id: I0266ba67f3849b6f7e331a758146b331730bae55 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/patches/salt-formula-linux/0001-Set-ovs-bridges-as-L3-interfaces.patch')
-rw-r--r--mcp/patches/salt-formula-linux/0001-Set-ovs-bridges-as-L3-interfaces.patch25
1 files changed, 19 insertions, 6 deletions
diff --git a/mcp/patches/salt-formula-linux/0001-Set-ovs-bridges-as-L3-interfaces.patch b/mcp/patches/salt-formula-linux/0001-Set-ovs-bridges-as-L3-interfaces.patch
index 92d17a1a4..9479a990b 100644
--- a/mcp/patches/salt-formula-linux/0001-Set-ovs-bridges-as-L3-interfaces.patch
+++ b/mcp/patches/salt-formula-linux/0001-Set-ovs-bridges-as-L3-interfaces.patch
@@ -10,13 +10,22 @@ From: Michael Polenchuk <mpolenchuk@mirantis.com>
Date: Wed, 28 Feb 2018 17:54:28 +0400
Subject: [PATCH] Set ovs bridges as L3 interfaces
+---
+ linux/files/ovs_bridge | 22 ++++++++++++++++++++++
+ linux/files/ovs_port | 8 +++++++-
+ linux/network/interface.sls | 34 +++++++++++++++++++++++++++++++++-
+ 3 files changed, 62 insertions(+), 2 deletions(-)
+ create mode 100644 linux/files/ovs_bridge
+
diff --git a/linux/files/ovs_bridge b/linux/files/ovs_bridge
new file mode 100644
-index 0000000..1322eeb
+index 0000000..4718b91
--- /dev/null
+++ b/linux/files/ovs_bridge
-@@ -0,0 +1,20 @@
-+auto {{ bridge_name }}
+@@ -0,0 +1,22 @@
++# With systemd, adding OVS bridges as 'auto' can cause race conditions
++# https://github.com/openvswitch/ovs/blob/master/debian/openvswitch-switch.README.Debian
++# auto {{ bridge_name }}
+allow-ovs {{ bridge_name }}
+iface {{ bridge_name }} inet {{ bridge.get('proto', 'static' if bridge.address is defined else 'manual') }}
+ ovs_type OVSBridge
@@ -37,11 +46,15 @@ index 0000000..1322eeb
+ dns-nameservers {{ bridge.name_servers | join(' ') }}
+ {%- endif %}
diff --git a/linux/files/ovs_port b/linux/files/ovs_port
-index 222ca8e..efb0307 100644
+index 222ca8e..41821b7 100644
--- a/linux/files/ovs_port
+++ b/linux/files/ovs_port
-@@ -1,6 +1,9 @@
- auto {{ port_name }}
+@@ -1,6 +1,12 @@
+-auto {{ port_name }}
++# With systemd, adding OVS bridges as 'auto' can cause race conditions
++# https://github.com/openvswitch/ovs/blob/master/debian/openvswitch-switch.README.Debian
++# OVS ports will be automatically ifup-ed when ifup-ing the OVS bridge
++# auto {{ port_name }}
allow-{{ port.bridge }} {{ port_name }}
iface {{ port_name }} inet {{ port.get('proto', 'manual') }}
+{%- if '.' in port_name %}