[pve-devel] [PATCH ifupdown2 1/3] upstream fix for error: 'NoneType' object has no attribute '__getitem__'
Alexandre Derumier
aderumier at odiso.com
Mon May 6 06:24:59 CEST 2019
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
...ge-fix-NoneType-object-has-no-attribute-_.patch | 32 ++++++++++++++++++++++
.../pve/0006-bridge-up-skip-tap-veth-fwpr.patch | 30 --------------------
debian/patches/series | 2 +-
3 files changed, 33 insertions(+), 31 deletions(-)
create mode 100644 debian/patches/extra/0001-addons-bridge-fix-NoneType-object-has-no-attribute-_.patch
delete mode 100644 debian/patches/pve/0006-bridge-up-skip-tap-veth-fwpr.patch
diff --git a/debian/patches/extra/0001-addons-bridge-fix-NoneType-object-has-no-attribute-_.patch b/debian/patches/extra/0001-addons-bridge-fix-NoneType-object-has-no-attribute-_.patch
new file mode 100644
index 0000000..da8ce68
--- /dev/null
+++ b/debian/patches/extra/0001-addons-bridge-fix-NoneType-object-has-no-attribute-_.patch
@@ -0,0 +1,32 @@
+From 1d35560dc603ac43a87a5584c6776d9872ede4e5 Mon Sep 17 00:00:00 2001
+From: Julien Fortin <julien at cumulusnetworks.com>
+Date: Fri, 19 Apr 2019 17:14:21 +0800
+Subject: addons: bridge: fix 'NoneType' object has
+ no attribute '__getitem__' error
+
+Fixes #90
+
+Signed-off-by: Julien Fortin <julien at cumulusnetworks.com>
+Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
+---
+ ifupdown2/addons/bridge.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
+index 9c1de18..973ec7e 100644
+--- a/ifupdown2/addons/bridge.py
++++ b/ifupdown2/addons/bridge.py
+@@ -2055,8 +2055,8 @@ class bridge(moduleBase):
+ finally:
+ if ifaceobj.link_type != ifaceLinkType.LINK_NA:
+ for p in running_ports:
+- if (ifaceobj_getfunc(p)[0].link_privflags &
+- ifaceLinkPrivFlags.KEEP_LINK_DOWN):
++ ifaceobj_list = ifaceobj_getfunc(p)
++ if (ifaceobj_list and ifaceobj_list[0].link_privflags & ifaceLinkPrivFlags.KEEP_LINK_DOWN):
+ netlink.link_set_updown(p, "down")
+ continue
+ try:
+--
+2.11.0
+
diff --git a/debian/patches/pve/0006-bridge-up-skip-tap-veth-fwpr.patch b/debian/patches/pve/0006-bridge-up-skip-tap-veth-fwpr.patch
deleted file mode 100644
index 70a9867..0000000
--- a/debian/patches/pve/0006-bridge-up-skip-tap-veth-fwpr.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 0afe358bb8fb326161fd7cf16f9686eac0c84ca1 Mon Sep 17 00:00:00 2001
-From: Alexandre Derumier <aderumier at odiso.com>
-Date: Wed, 17 Apr 2019 01:02:51 +0200
-Subject: [PATCH] bridge up : skip tap|veth|fwpr
-
-to avoid this kind of error:
-
-info: vmbr5001: applying bridge port configuration: ['tap111i0']
-info: vmbr5001: applying bridge configuration specific to ports
-error: 'NoneType' object has no attribute '__getitem__'
----
- ifupdown2/addons/bridge.py | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
-index e70fc07..fbbe8e4 100644
---- a/ifupdown2/addons/bridge.py
-+++ b/ifupdown2/addons/bridge.py
-@@ -2050,6 +2050,8 @@ class bridge(moduleBase):
- finally:
- if ifaceobj.link_type != ifaceLinkType.LINK_NA:
- for p in running_ports:
-+ if re.match('^(tap|veth|fwpr)',p):
-+ continue
- if (ifaceobj_getfunc(p)[0].link_privflags &
- ifaceLinkPrivFlags.KEEP_LINK_DOWN):
- netlink.link_set_updown(p, "down")
---
-2.11.0
-
diff --git a/debian/patches/series b/debian/patches/series
index 26b9cac..5975ab1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,4 +3,4 @@ pve/0002-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch
pve/0003-add-dummy-mtu-bridgevlanport-modules.patch
pve/0004-debian-fixup-networking.service.patch
pve/0005-allow-vlan-subinterface-in-a-vlan-aware-bridge.patch
-pve/0006-bridge-up-skip-tap-veth-fwpr.patch
+extra/0001-addons-bridge-fix-NoneType-object-has-no-attribute-_.patch
--
2.11.0
More information about the pve-devel
mailing list