[pve-devel] [PATCH V2 ifupdown2 10/10] add patch 0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch

Alexandre Derumier aderumier at odiso.com
Tue Jun 2 10:31:23 CEST 2020


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 ...ports-condone-regex-exclude-tap-veth.patch | 34 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 debian/patches/pve/0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch

diff --git a/debian/patches/pve/0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch b/debian/patches/pve/0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
new file mode 100644
index 0000000..4cfdbf6
--- /dev/null
+++ b/debian/patches/pve/0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
@@ -0,0 +1,34 @@
+From cfe5feada5532830a53031138c471541ebec813d Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <aderumier at odiso.com>
+Date: Sun, 17 May 2020 15:46:36 +0200
+Subject: [PATCH] openvswitch : ovs-ports-condone-regex : exclude tap|veth|fwln
+
+Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
+---
+ ifupdown2/addons/openvswitch.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ifupdown2/addons/openvswitch.py b/ifupdown2/addons/openvswitch.py
+index 468d7df..48beef3 100644
+--- a/ifupdown2/addons/openvswitch.py
++++ b/ifupdown2/addons/openvswitch.py
+@@ -65,6 +65,7 @@ class openvswitch(Addon, moduleBase):
+             },
+             'ovs-ports-condone-regex': {
+                     "help": "ovs ports to ignore/condone when reloading config / removing interfaces",
++                    "default": "^(tap|veth|fwln)",
+                     "required": False,
+                     "example": ["ovs-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"]
+             },
+@@ -101,6 +102,8 @@ class openvswitch(Addon, moduleBase):
+ 
+     def _get_ovs_port_condone_regex(self, ifaceobj, get_string = False):
+         ovs_port_condone_regex = ifaceobj.get_attr_value_first('ovs-ports-condone-regex')
++        if not ovs_port_condone_regex:
++            ovs_port_condone_regex = self.get_attr_default_value('ovs-ports-condone-regex')
+         if ovs_port_condone_regex:
+             if get_string:
+                 return ovs_port_condone_regex
+-- 
+2.20.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 92b4af5..af41dfe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,4 +9,5 @@ pve/0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
 pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
 pve/0006-config-tuning.patch
 pve/0007-networking.service-fix-dependencies-and-ordering.patch
+pve/0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
 pve/0010-postinst-rm-update-network-config-compatibility.patch
-- 
2.20.1




More information about the pve-devel mailing list