]> git.proxmox.com Git - ifupdown2.git/blame - debian/patches/upstream/0001-scheduler-import-traceback.patch
patch: add missing import traceback in scheduler
[ifupdown2.git] / debian / patches / upstream / 0001-scheduler-import-traceback.patch
CommitLineData
1d1512c8
AD
1From 4b674a4c722c3e2072cf9e7d6d08195d9da7b698 Mon Sep 17 00:00:00 2001
2From: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
3Date: Mon, 26 Jun 2023 11:14:26 +0200
4Subject: [PATCH] scheduler: import traceback
5
6if a script in /etc/network/ifup.d/ is segfaulting,
7
8on config loading (ifup -a), ifupdown2 is stopping
9
10ifup -a
11"
12info: executing2 /etc/network/if-up.d/postfix
13debug: lo: up : running script /etc/network/if-up.d/resolved
14info: executing2 /etc/network/if-up.d/resolved
15error: name 'traceback' is not defined
16debug: saving state ..
17info: exit status 1
18"
19
20with this fix:
21
22debug: lo: up : running script /etc/network/if-up.d/resolved
23info: executing2 /etc/network/if-up.d/resolved
24 File "/usr/share/ifupdown2/ifupdown/scheduler.py", line 325, in run_iface_list
25 cls.run_iface_graph(ifupdownobj, ifacename, ops, parent,
26 File "/usr/share/ifupdown2/ifupdown/scheduler.py", line 315, in run_iface_graph
27 cls.run_iface_list_ops(ifupdownobj, ifaceobjs, ops)
28 File "/usr/share/ifupdown2/ifupdown/scheduler.py", line 188, in run_iface_list_ops
29 cls.run_iface_op(ifupdownobj, ifaceobj, op,
30 File "/usr/share/ifupdown2/ifupdown/scheduler.py", line 150, in run_iface_op
31 ifupdownobj.log_error('%s: %s %s' % (ifacename, op, str(e)))
32 File "/usr/share/ifupdown2/ifupdown/ifupdownmain.py", line 226, in log_error
33 raise Exception(str)
34error: lo : lo: up cmd '/etc/network/if-up.d/resolved' failed: returned -11
35debug: vmbr0: found dependents ['bond0']
36debug: bond0: found dependents ['enp65s0d1', 'enp65s0']
37info: enp65s0d1: running ops ...
38...
39...
40
41Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
42---
43 ifupdown2/ifupdown/scheduler.py | 1 +
44 1 file changed, 1 insertion(+)
45
46diff --git a/ifupdown2/ifupdown/scheduler.py b/ifupdown2/ifupdown/scheduler.py
47index 154e557..fda6ff2 100644
48--- a/ifupdown2/ifupdown/scheduler.py
49+++ b/ifupdown2/ifupdown/scheduler.py
50@@ -9,6 +9,7 @@
51
52 import os
53 import sys
54+import traceback
55
56 from collections import OrderedDict
57
58--
592.39.2
60