[pve-devel] [PATCH V3 ifupdown2 1/3] remove patch 0008-execute-addons-scripts-before-modules.patch
Alexandre Derumier
aderumier at odiso.com
Fri Feb 21 10:27:12 CET 2020
This was a workaround for openvswitch
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
...xecute-addons-scripts-before-modules.patch | 71 -------------------
debian/patches/series | 1 -
2 files changed, 72 deletions(-)
delete mode 100644 debian/patches/pve/0008-execute-addons-scripts-before-modules.patch
diff --git a/debian/patches/pve/0008-execute-addons-scripts-before-modules.patch b/debian/patches/pve/0008-execute-addons-scripts-before-modules.patch
deleted file mode 100644
index c165010..0000000
--- a/debian/patches/pve/0008-execute-addons-scripts-before-modules.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From f20723e25d5b12edc57b2a1fd0901bd3ee7c91a7 Mon Sep 17 00:00:00 2001
-From: Alexandre Derumier <aderumier at odiso.com>
-Date: Mon, 3 Feb 2020 05:56:49 +0100
-Subject: [PATCH] execute addons scripts before modules
-
-ip address are now setup in pre-up,
-but ovs interfaces are created in pre-up script too. (but after address module)
-
-We need to be sure than addons scripts are executed before modules
-
-Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
----
- ifupdown2/ifupdown/scheduler.py | 35 +++++++++++++++++----------------
- 1 file changed, 18 insertions(+), 17 deletions(-)
-
-diff --git a/ifupdown2/ifupdown/scheduler.py b/ifupdown2/ifupdown/scheduler.py
-index 00130ad..8b78f05 100644
---- a/ifupdown2/ifupdown/scheduler.py
-+++ b/ifupdown2/ifupdown/scheduler.py
-@@ -84,6 +84,24 @@ class ifaceScheduler():
- query_ifaceobj.set_state_n_status(ifaceState.from_str(op),
- ifaceStatus.NOTFOUND)
- return
-+
-+ if ifupdownobj.config.get('addon_scripts_support', '0') == '1':
-+ # execute /etc/network/ scripts
-+ os.environ['IFACE'] = ifaceobj.name if ifaceobj.name else ''
-+ os.environ['LOGICAL'] = ifaceobj.name if ifaceobj.name else ''
-+ os.environ['METHOD'] = ifaceobj.addr_method if ifaceobj.addr_method else ''
-+ os.environ['ADDRFAM'] = ','.join(ifaceobj.addr_family) if ifaceobj.addr_family else ''
-+ for mname in ifupdownobj.script_ops.get(op, []):
-+ ifupdownobj.logger.debug('%s: %s : running script %s'
-+ %(ifacename, op, mname))
-+ try:
-+ utils.exec_command(mname, env=cenv)
-+ except Exception, e:
-+ if "permission denied" in str(e).lower():
-+ ifupdownobj.logger.warning('%s: %s %s' % (ifacename, op, str(e)))
-+ else:
-+ ifupdownobj.log_error('%s: %s %s' % (ifacename, op, str(e)))
-+
- for mname in ifupdownobj.module_ops.get(op):
- m = ifupdownobj.modules.get(mname)
- err = 0
-@@ -126,23 +144,6 @@ class ifaceScheduler():
- ifaceobj.set_state_n_status(ifaceState.from_str(op),
- status)
-
-- if ifupdownobj.config.get('addon_scripts_support', '0') == '1':
-- # execute /etc/network/ scripts
-- os.environ['IFACE'] = ifaceobj.name if ifaceobj.name else ''
-- os.environ['LOGICAL'] = ifaceobj.name if ifaceobj.name else ''
-- os.environ['METHOD'] = ifaceobj.addr_method if ifaceobj.addr_method else ''
-- os.environ['ADDRFAM'] = ','.join(ifaceobj.addr_family) if ifaceobj.addr_family else ''
-- for mname in ifupdownobj.script_ops.get(op, []):
-- ifupdownobj.logger.debug('%s: %s : running script %s'
-- %(ifacename, op, mname))
-- try:
-- utils.exec_command(mname, env=cenv)
-- except Exception, e:
-- if "permission denied" in str(e).lower():
-- ifupdownobj.logger.warning('%s: %s %s' % (ifacename, op, str(e)))
-- else:
-- ifupdownobj.log_error('%s: %s %s' % (ifacename, op, str(e)))
--
- @classmethod
- def run_iface_list_ops(cls, ifupdownobj, ifaceobjs, ops):
- """ Runs all operations on a list of interface
---
-2.20.1
-
diff --git a/debian/patches/series b/debian/patches/series
index 6f81e1f..3f39fc8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,4 +6,3 @@ 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-execute-addons-scripts-before-modules.patch
--
2.20.1
More information about the pve-devel
mailing list