]> git.proxmox.com Git - ifupdown2.git/commitdiff
patch: ifup/ifdown vxlan interface on reload
authorAlexandre Derumier <aderumier@odiso.com>
Thu, 13 Jun 2019 12:48:53 +0000 (14:48 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 14 Jun 2019 05:17:16 +0000 (07:17 +0200)
almost all vxlan options can't be changed online,
simply ifdown/up them in case of reload

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
debian/patches/extra/0001-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/extra/0001-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch b/debian/patches/extra/0001-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
new file mode 100644 (file)
index 0000000..a2df043
--- /dev/null
@@ -0,0 +1,33 @@
+From 0eb16c0cae122a69a01acc228067f84bfbb0b6dc Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <aderumier@odiso.com>
+Date: Wed, 5 Jun 2019 14:47:05 +0200
+Subject: [PATCH] ifreload: down/up vxlan interfaces when
+ ifreload_down_changed=0
+
+almost all attributes of vxlan interfaces can't be updated
+in current kernel (<= 5.2). (including vxlan-id)
+
+so when ifreload_down_changed=0, ifreload can't update vxlan.
+
+fix: https://github.com/CumulusNetworks/ifupdown2/issues/50
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
+---
+ ifupdown2/ifupdown/ifupdownmain.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ifupdown2/ifupdown/ifupdownmain.py b/ifupdown2/ifupdown/ifupdownmain.py
+index f520994..f1fd0d7 100644
+--- a/ifupdown2/ifupdown/ifupdownmain.py
++++ b/ifupdown2/ifupdown/ifupdownmain.py
+@@ -2099,7 +2099,7 @@ class ifupdownMain(ifupdownBase):
+                                      % (newifaceobjlist[objidx].name,
+                                         ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind)))
+                     ifacedownlist.append(newifaceobjlist[objidx].name)
+-                if not down_changed:
++                if not down_changed and ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind) != 'vxlan':
+                     continue
+                 if len(newifaceobjlist) != len(lastifaceobjlist):
+                     ifacedownlist.append(ifname)
+-- 
+2.11.0
+
index 5fc2cfc8a558456502208fbcacc90805ebeaeebf..e1c10320d13ef930a294a0a7e635d7b42bd19418 100644 (file)
@@ -3,3 +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
+extra/0001-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch