]>
Commit | Line | Data |
---|---|---|
1d1512c8 AD |
1 | From 4b674a4c722c3e2072cf9e7d6d08195d9da7b698 Mon Sep 17 00:00:00 2001 |
2 | From: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com> | |
3 | Date: Mon, 26 Jun 2023 11:14:26 +0200 | |
4 | Subject: [PATCH] scheduler: import traceback | |
5 | ||
6 | if a script in /etc/network/ifup.d/ is segfaulting, | |
7 | ||
8 | on config loading (ifup -a), ifupdown2 is stopping | |
9 | ||
10 | ifup -a | |
11 | " | |
12 | info: executing2 /etc/network/if-up.d/postfix | |
13 | debug: lo: up : running script /etc/network/if-up.d/resolved | |
14 | info: executing2 /etc/network/if-up.d/resolved | |
15 | error: name 'traceback' is not defined | |
16 | debug: saving state .. | |
17 | info: exit status 1 | |
18 | " | |
19 | ||
20 | with this fix: | |
21 | ||
22 | debug: lo: up : running script /etc/network/if-up.d/resolved | |
23 | info: 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) | |
34 | error: lo : lo: up cmd '/etc/network/if-up.d/resolved' failed: returned -11 | |
35 | debug: vmbr0: found dependents ['bond0'] | |
36 | debug: bond0: found dependents ['enp65s0d1', 'enp65s0'] | |
37 | info: enp65s0d1: running ops ... | |
38 | ... | |
39 | ... | |
40 | ||
41 | Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com> | |
42 | --- | |
43 | ifupdown2/ifupdown/scheduler.py | 1 + | |
44 | 1 file changed, 1 insertion(+) | |
45 | ||
46 | diff --git a/ifupdown2/ifupdown/scheduler.py b/ifupdown2/ifupdown/scheduler.py | |
47 | index 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 | -- | |
59 | 2.39.2 | |
60 |