summaryrefslogtreecommitdiffstats
path: root/mcp/patches/salt-formula-linux/0001-Set-ovs-bridges-as-L3-interfaces.patch
diff options
context:
space:
mode:
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.patch31
1 files changed, 18 insertions, 13 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 50c011297..cf3da7feb 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
@@ -1,5 +1,5 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2018 Mirantis Inc., Enea AB and others.
+: Copyright (c) 2019 Mirantis Inc., Enea AB and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
@@ -10,14 +10,6 @@ From: Michael Polenchuk <mpolenchuk@mirantis.com>
Date: Wed, 28 Feb 2018 17:54:28 +0400
Subject: [PATCH] Set ovs bridges as L3 interfaces
-Change-Id: I1e83129cc184cf481bea21d7aa452bf60d9e0499
----
- linux/files/ovs_bridge | 18 ++++++++++++++++++
- linux/files/ovs_port | 7 ++++++-
- linux/network/interface.sls | 28 ++++++++++++++++++++++++++++
- 3 files changed, 52 insertions(+), 1 deletion(-)
- 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..d33864c
@@ -60,10 +52,10 @@ index 222ca8e..03072cd 100644
mtu {{ port.get('mtu', '1500') }}
ovs_bridge {{ port.bridge }}
diff --git a/linux/network/interface.sls b/linux/network/interface.sls
-index a39fc37..b76c5d6 100644
+index a39fc37..c4a94a3 100644
--- a/linux/network/interface.sls
+++ b/linux/network/interface.sls
-@@ -92,6 +92,34 @@ add_int_{{ int_name }}_to_ovs_dpdk_bridge_{{ interface_name }}:
+@@ -92,6 +92,37 @@ add_int_{{ int_name }}_to_ovs_dpdk_bridge_{{ interface_name }}:
ovs_bridge_{{ interface_name }}:
openvswitch_bridge.present:
- name: {{ interface_name }}
@@ -92,9 +84,22 @@ index a39fc37..b76c5d6 100644
+ - file: ovs_bridge_{{ interface_name }}
+ - openvswitch_bridge: ovs_bridge_{{ interface_name }}
+ - file: linux_interfaces_final_include
-+ - unless:
-+ - ip link show {{ interface_name }} | grep -q '\<UP\>'
++ {%- if network.noifupdown|d(false) or interface.noifupdown|d(false) %}
++ - onlyif: /bin/false
++ {%- else %}
++ - unless: ip link show {{ interface_name }} | grep -q '\<UP\>'
++ {%- endif %}
+{%- endif %}
{# add linux network interface into OVS bridge #}
{%- for int_name, int in network.interface.items() %}
+@@ -176,6 +207,9 @@ ovs_port_{{ interface_name }}_line2:
+ ovs_port_up_{{ interface_name }}:
+ cmd.run:
+ - name: ifup {{ interface_name }}
++ {%- if network.noifupdown|d(false) or interface.noifupdown|d(false) %}
++ - onlyif: /bin/false
++ {%- endif %}
+ - require:
+ - file: ovs_port_{{ interface_name }}
+ - file: ovs_port_{{ interface_name }}_line1