From 67c61e6cbfe1e623dd8d2722404b9ee418062fe9 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 3 Jun 2020 09:37:17 +0200 Subject: [PATCH] update to master to avoid extra patches All upstreamed by Alexandre and the master at time of writing is besides one patch just that, so use it directly. Signed-off-by: Thomas Lamprecht --- .../0001-ovs-ovs-ports-condone-regex.patch | 66 ------------------- .../0002-nllistener-increase-buffer.patch | 25 ------- .../extra/0003-ovs-multiple-ovsport.patch | 53 --------------- ...0004-fix-start-networking-permission.patch | 13 ---- debian/patches/series | 4 -- ifupdown2 | 2 +- 6 files changed, 1 insertion(+), 162 deletions(-) delete mode 100644 debian/patches/extra/0001-ovs-ovs-ports-condone-regex.patch delete mode 100644 debian/patches/extra/0002-nllistener-increase-buffer.patch delete mode 100644 debian/patches/extra/0003-ovs-multiple-ovsport.patch delete mode 100644 debian/patches/extra/0004-fix-start-networking-permission.patch diff --git a/debian/patches/extra/0001-ovs-ovs-ports-condone-regex.patch b/debian/patches/extra/0001-ovs-ovs-ports-condone-regex.patch deleted file mode 100644 index 745c5e0..0000000 --- a/debian/patches/extra/0001-ovs-ovs-ports-condone-regex.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 5efdf225e1f0e2705d44f36887c3e00207dd69d2 Mon Sep 17 00:00:00 2001 -From: Alexandre Derumier -Date: Sat, 16 May 2020 08:11:22 +0200 -Subject: [PATCH] addon: openvswitch : add ovs-ports-condone-regex option - -Like for bridge, add a option to skip delete a regex list of interfaces. -(can be usefull for hypervisor, when vm interfaces are dynamically plugged) ---- - ifupdown2/addons/openvswitch.py | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/ifupdown2/addons/openvswitch.py b/ifupdown2/addons/openvswitch.py -index 767d09a..468d7df 100644 ---- a/ifupdown2/addons/openvswitch.py -+++ b/ifupdown2/addons/openvswitch.py -@@ -63,6 +63,11 @@ class openvswitch(Addon, moduleBase): - 'example': ['ovs_extra set bridge ${IFACE} other-config:hwaddr=00:59:cf:9c:84:3a -- br-set-external-id ${IFACE} bridge-id ${IFACE}'] - - }, -+ 'ovs-ports-condone-regex': { -+ "help": "ovs ports to ignore/condone when reloading config / removing interfaces", -+ "required": False, -+ "example": ["ovs-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"] -+ }, - } - } - -@@ -94,6 +99,14 @@ def _get_running_ovs_ports (self, iface): - return ovs_ports - return None - -+ 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 ovs_port_condone_regex: -+ if get_string: -+ return ovs_port_condone_regex -+ return re.compile (r"%s" % ovs_port_condone_regex) -+ return None -+ - def _ovs_vsctl(self, ifaceobj, cmdlist): - - if cmdlist: -@@ -122,6 +135,7 @@ def _addbridge (self, ifaceobj): - ovsoptions = ifaceobj.get_attr_value_first ('ovs-options') - ovsextra = ifaceobj.get_attr_value('ovs-extra') - ovsmtu = ifaceobj.get_attr_value_first ('ovs-mtu') -+ ovsportscondoneregex = self._get_ovs_port_condone_regex(ifaceobj) - - cmd_list = [] - -@@ -137,11 +151,15 @@ def _addbridge (self, ifaceobj): - # on update, delete active ports not in the new port list - ovs_ports = self._get_ovs_ports(ifaceobj) - running_ovs_ports = self._get_running_ovs_ports(iface) -+ - if running_ovs_ports is not None and ovs_ports is not None: - missingports = list(set(running_ovs_ports) - set(ovs_ports)) - - if missingports is not None: - for port in missingports: -+ if ovsportscondoneregex and ovsportscondoneregex.match(port): -+ self.logger.info("%s: port %s will stay enslaved as it matches with ovs-ports-condone-regex" % (ifaceobj.name, port)) -+ continue - cmd = "--if-exists del-port %s %s"%(iface, port) - cmd_list.append(cmd) - diff --git a/debian/patches/extra/0002-nllistener-increase-buffer.patch b/debian/patches/extra/0002-nllistener-increase-buffer.patch deleted file mode 100644 index 72a4f06..0000000 --- a/debian/patches/extra/0002-nllistener-increase-buffer.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 523b347ad49234efb7787f6f084070034de7e977 Mon Sep 17 00:00:00 2001 -From: Alexandre Derumier -Date: Wed, 27 May 2020 15:49:49 +0200 -Subject: [PATCH] nllistener: increase netlink buffer to 64k - -Currently 4k buffer is too small to handle some netlink messages - -(Like bridge vlans for example, with 32k messages detected). ---- - ifupdown2/nlmanager/nllistener.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ifupdown2/nlmanager/nllistener.py b/ifupdown2/nlmanager/nllistener.py -index b40b058..e319dc4 100644 ---- a/ifupdown2/nlmanager/nllistener.py -+++ b/ifupdown2/nlmanager/nllistener.py -@@ -44,7 +44,7 @@ class NetlinkListener(Thread): - # As defined in asm/socket.h - _SO_ATTACH_FILTER = 26 - -- RECV_BUFFER = 4096 # 1024 * 1024 -+ RECV_BUFFER = 65536 # 1024 * 1024 - - def __init__(self, manager, groups, pid_offset=1, error_notification=False, rcvbuf_sz=10000000, bpf_filter=None): - """ diff --git a/debian/patches/extra/0003-ovs-multiple-ovsport.patch b/debian/patches/extra/0003-ovs-multiple-ovsport.patch deleted file mode 100644 index bb18056..0000000 --- a/debian/patches/extra/0003-ovs-multiple-ovsport.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 6cdb2b3d220fdf60ea8d0a2982a90c583dec467e Mon Sep 17 00:00:00 2001 -From: Alexandre Derumier -Date: Thu, 28 May 2020 11:21:55 +0200 -Subject: [PATCH] addons: openvswitch: allow multiple ovs-ports + glob/regex - ---- - ifupdown2/addons/openvswitch.py | 18 +++++++++++++++--- - 1 file changed, 15 insertions(+), 3 deletions(-) - -diff --git a/ifupdown2/addons/openvswitch.py b/ifupdown2/addons/openvswitch.py -index 468d7df..936c871 100644 ---- a/ifupdown2/addons/openvswitch.py -+++ b/ifupdown2/addons/openvswitch.py -@@ -37,6 +37,12 @@ class openvswitch(Addon, moduleBase): - 'help': 'Interfaces to be part of this ovs bridge.', - 'validvals': [''], - 'required': False, -+ "multivalue": True, -+ "example": [ -+ "ovs-ports swp1.100 swp2.100 swp3.100", -+ "ovs-ports glob swp1-3.100", -+ "ovs-ports regex (swp[1|2|3].100)" -+ ] - }, - 'ovs-type': { - 'help': 'ovs interface type', -@@ -87,10 +93,15 @@ def _is_ovs_bridge (self, ifaceobj): - return False - - def _get_ovs_ports (self, ifaceobj): -- ovs_ports = ifaceobj.get_attr_value_first('ovs-ports') -+ ovs_ports = [] -+ -+ for port in ifaceobj.get_attr_value('ovs-ports') or []: -+ ovs_ports.extend(port.split()) -+ - if ovs_ports: -- return sorted (ovs_ports.split ()) -- return None -+ return self.parse_port_list(ifaceobj.name, ' '.join(ovs_ports)) -+ else: -+ return None - - def _get_running_ovs_ports (self, iface): - output = utils.exec_command("/usr/bin/ovs-vsctl list-ports %s" %iface) -@@ -152,6 +163,7 @@ def _addbridge (self, ifaceobj): - ovs_ports = self._get_ovs_ports(ifaceobj) - running_ovs_ports = self._get_running_ovs_ports(iface) - -+ missingports = [] - if running_ovs_ports is not None and ovs_ports is not None: - missingports = list(set(running_ovs_ports) - set(ovs_ports)) - diff --git a/debian/patches/extra/0004-fix-start-networking-permission.patch b/debian/patches/extra/0004-fix-start-networking-permission.patch deleted file mode 100644 index 5357e31..0000000 --- a/debian/patches/extra/0004-fix-start-networking-permission.patch +++ /dev/null @@ -1,13 +0,0 @@ -From 5cbe13d17a28e1ce4a411092f0bd659360406572 Mon Sep 17 00:00:00 2001 -From: bauen1 -Date: Fri, 15 May 2020 17:16:04 +0200 -Subject: [PATCH] allow systemd to execute the helper script - ---- - ifupdown2/sbin/start-networking | 0 - 1 file changed, 0 insertions(+), 0 deletions(-) - mode change 100644 => 100755 ifupdown2/sbin/start-networking - -diff --git a/ifupdown2/sbin/start-networking b/ifupdown2/sbin/start-networking -old mode 100644 -new mode 100755 diff --git a/debian/patches/series b/debian/patches/series index af41dfe..a83e94e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,7 +1,3 @@ -extra/0001-ovs-ovs-ports-condone-regex.patch -extra/0002-nllistener-increase-buffer.patch -extra/0003-ovs-multiple-ovsport.patch -extra/0004-fix-start-networking-permission.patch pve/0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch pve/0002-add-dummy-mtu-bridgevlanport-modules.patch pve/0003-allow-vlan-subinterface-in-a-vlan-aware-bridge.patch diff --git a/ifupdown2 b/ifupdown2 index 5890ab7..e665b9f 160000 --- a/ifupdown2 +++ b/ifupdown2 @@ -1 +1 @@ -Subproject commit 5890ab714e965f958f51ebd31e397ef83779906e +Subproject commit e665b9f166fd07bb3627fd289aa07eb8fa5a0782 -- 2.39.2