Generate them with --zero-commit passed to git format-patch.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
-From 9c3dcc88df68adc1acda3faa2118917b038574c5 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Mon, 14 May 2018 16:27:22 +0200
-Subject: [PATCH 2/4] addons scripts : fix ENV for interfaces options
+Subject: [PATCH] addons scripts : fix ENV for interfaces options
This is a bug currently, where env vars with interfaces options
were not reset between interfaces
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ifupdown2/ifupdown/ifupdownmain.py b/ifupdown2/ifupdown/ifupdownmain.py
-index 3c72429..e818880 100644
+index 2daf49f..4931f73 100644
--- a/ifupdown2/ifupdown/ifupdownmain.py
+++ b/ifupdown2/ifupdown/ifupdownmain.py
-@@ -1556,7 +1556,7 @@ class ifupdownMain(ifupdownBase):
+@@ -1552,7 +1552,7 @@ class ifupdownMain(ifupdownBase):
cenv = None
iface_env = ifaceobj.get_env()
if iface_env:
--- /dev/null
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <aderumier@odiso.com>
+Date: Wed, 16 May 2018 09:58:45 +0200
+Subject: [PATCH] add vxlan-physdev support
+
+backported from master branch
+https://github.com/CumulusNetworks/ifupdown2/pull/19
+---
+ ifupdown2/addons/vxlan.py | 19 ++++++++++++++++++-
+ ifupdown2/ifupdown/netlink.py | 8 ++++++--
+ ifupdown2/ifupdownaddons/LinkUtils.py | 5 ++++-
+ ifupdown2/nlmanager/nlmanager.py | 4 +++-
+ 4 files changed, 31 insertions(+), 5 deletions(-)
+
+diff --git a/ifupdown2/addons/vxlan.py b/ifupdown2/addons/vxlan.py
+index 3148e44..2aedbfc 100644
+--- a/ifupdown2/addons/vxlan.py
++++ b/ifupdown2/addons/vxlan.py
+@@ -54,6 +54,9 @@ class vxlan(moduleBase):
+ 'validvals' : ['<ipv4>'],
+ 'example': ['vxlan-remoteip 172.16.22.127'],
+ 'multiline': True},
++ 'vxlan-physdev' :
++ {'help' : 'vxlan physical device',
++ 'example': ['vxlan-physdev eth1']},
+ 'vxlan-learning' :
+ {'help' : 'vxlan learning yes/no',
+ 'validvals' : ['yes', 'no', 'on', 'off'],
+@@ -123,6 +126,13 @@ class vxlan(moduleBase):
+ vxlan._clagd_vxlan_anycast_ip = clagd_vxlan_list[0]
+
+ self._set_global_local_ip(ifaceobj)
++
++ # If we should use a specific underlay device for the VXLAN
++ # tunnel make sure this device is set up before the VXLAN iface.
++ physdev = ifaceobj.get_attr_value_first('vxlan-physdev')
++ if physdev:
++ return [ physdev ]
++
+ return None
+
+ def _set_global_local_ip(self, ifaceobj):
+@@ -184,6 +194,7 @@ class vxlan(moduleBase):
+ self.syntax_check_localip_anycastip_equal(ifname, local, anycastip)
+ # if both local-ip and anycast-ip are identical the function prints a warning
+
++ physdev = ifaceobj.get_attr_value_first('vxlan-physdev')
+ ageing = ifaceobj.get_attr_value_first('vxlan-ageing')
+ vxlan_port = ifaceobj.get_attr_value_first('vxlan-port')
+ purge_remotes = self._get_purge_remotes(ifaceobj)
+@@ -291,7 +302,8 @@ class vxlan(moduleBase):
+ learning=learning,
+ ageing=ageing,
+ group=group,
+- dstport=vxlan_port)
++ dstport=vxlan_port,
++ physdev=physdev)
+ except Exception as e_netlink:
+ self.logger.debug('%s: vxlan netlink: %s' % (ifname, str(e_netlink)))
+ try:
+@@ -463,6 +475,11 @@ class vxlan(moduleBase):
+ self._query_check_n_update(ifaceobj, ifaceobjcurr, 'vxlan-ageing',
+ ageing, vxlanattrs.get('ageing'))
+
++ physdev = ifaceobj.get_attr_value_first('vxlan-physdev')
++ if physdev:
++ self._query_check_n_update(ifaceobj, ifaceobjcurr, 'vxlan-physdev',
++ physdev, vxlanattrs.get('physdev'))
++
+ def _query_running(self, ifaceobjrunning):
+ vxlanattrs = self.ipcmd.get_vxlandev_attrs(ifaceobjrunning.name)
+ if not vxlanattrs:
+diff --git a/ifupdown2/ifupdown/netlink.py b/ifupdown2/ifupdown/netlink.py
+index 6a29902..2e6fc55 100644
+--- a/ifupdown2/ifupdown/netlink.py
++++ b/ifupdown2/ifupdown/netlink.py
+@@ -263,7 +263,7 @@ class Netlink(utilsBase):
+ % (ifacename, vlanid, str(e)))
+
+ def link_add_vxlan(self, ifacename, vxlanid, local=None, dstport=VXLAN_UDP_PORT,
+- group=None, learning=True, ageing=None):
++ group=None, learning=True, ageing=None, physdev=None):
+ cmd = 'ip link add %s type vxlan id %s dstport %s' % (ifacename,
+ vxlanid,
+ dstport)
+@@ -271,16 +271,20 @@ class Netlink(utilsBase):
+ cmd += ' ageing %s' % ageing if ageing else ''
+ cmd += ' remote %s' % group if group else ' noremote'
+ cmd += ' nolearning' if not learning else ''
++ cmd += ' dev %s' % physdev if physdev else ''
+ self.logger.info('%s: netlink: %s' % (ifacename, cmd))
+ if ifupdownflags.flags.DRYRUN: return
+ try:
++ if physdev:
++ physdev = self.get_iface_index (physdev)
+ return self._nlmanager_api.link_add_vxlan(ifacename,
+ vxlanid,
+ dstport=dstport,
+ local=local,
+ group=group,
+ learning=learning,
+- ageing=ageing)
++ ageing=ageing,
++ physdev=physdev)
+ except Exception as e:
+ raise Exception('netlink: %s: cannot create vxlan %s: %s'
+ % (ifacename, vxlanid, str(e)))
+diff --git a/ifupdown2/ifupdownaddons/LinkUtils.py b/ifupdown2/ifupdownaddons/LinkUtils.py
+index ab93f77..81c0b57 100644
+--- a/ifupdown2/ifupdownaddons/LinkUtils.py
++++ b/ifupdown2/ifupdownaddons/LinkUtils.py
+@@ -515,18 +515,21 @@ class LinkUtils(utilsBase):
+ linkattrs['kind'] = 'vxlan'
+ vattrs = {'vxlanid': citems[i + 2],
+ 'svcnode': None,
++ 'physdev': None,
+ 'remote': [],
+ 'ageing': citems[i + 2],
+ 'learning': 'on'}
+ for j in range(i + 2, len(citems)):
+ if citems[j] == 'local':
+ vattrs['local'] = citems[j + 1]
+- elif citems[j] == 'remote':
++ elif citems[j] == 'group':
+ vattrs['svcnode'] = citems[j + 1]
+ elif citems[j] == 'ageing':
+ vattrs['ageing'] = citems[j + 1]
+ elif citems[j] == 'nolearning':
+ vattrs['learning'] = 'off'
++ elif citems[j] == 'dev':
++ vattrs['physdev'] = citems[j + 1]
+ linkattrs['linkinfo'] = vattrs
+ break
+ elif citems[i] == 'vrf' and citems[i + 1] == 'table':
+diff --git a/ifupdown2/nlmanager/nlmanager.py b/ifupdown2/nlmanager/nlmanager.py
+index e4a5892..14f7066 100644
+--- a/ifupdown2/nlmanager/nlmanager.py
++++ b/ifupdown2/nlmanager/nlmanager.py
+@@ -969,7 +969,7 @@ class NetlinkManager(object):
+ return self.tx_nlpacket_get_response(nbr)
+
+ def link_add_vxlan(self, ifname, vxlanid, dstport=None, local=None,
+- group=None, learning=True, ageing=None):
++ group=None, learning=True, ageing=None, physdev=None):
+
+ debug = RTM_NEWLINK in self.debug
+
+@@ -980,6 +980,8 @@ class NetlinkManager(object):
+ info_data[Link.IFLA_VXLAN_LOCAL] = local
+ if group:
+ info_data[Link.IFLA_VXLAN_GROUP] = group
++ if physdev:
++ info_data[Link.IFLA_VXLAN_LINK] = int (physdev)
+
+ info_data[Link.IFLA_VXLAN_LEARNING] = int(learning)
+
+--
+2.11.0
+
+++ /dev/null
-From 813b7bc0da9f4c9df65936d10aa9dc18d857d0a5 Mon Sep 17 00:00:00 2001
-From: Alexandre Derumier <aderumier@odiso.com>
-Date: Wed, 16 May 2018 09:58:45 +0200
-Subject: [PATCH] add vxlan-physdev support
-
-backported from master branch
-https://github.com/CumulusNetworks/ifupdown2/pull/19
----
- ifupdown2/addons/vxlan.py | 19 ++++++++++++++++++-
- ifupdown2/ifupdown/netlink.py | 8 ++++++--
- ifupdown2/ifupdownaddons/LinkUtils.py | 5 ++++-
- ifupdown2/nlmanager/nlmanager.py | 4 +++-
-
- 4 files changed, 31 insertions(+), 5 deletions(-)
-
-diff --git a/ifupdown2/addons/vxlan.py b/ifupdown2/addons/vxlan.py
-index 3148e44..2aedbfc 100644
---- a/ifupdown2/addons/vxlan.py
-+++ b/ifupdown2/addons/vxlan.py
-@@ -54,6 +54,9 @@ class vxlan(moduleBase):
- 'validvals' : ['<ipv4>'],
- 'example': ['vxlan-remoteip 172.16.22.127'],
- 'multiline': True},
-+ 'vxlan-physdev' :
-+ {'help' : 'vxlan physical device',
-+ 'example': ['vxlan-physdev eth1']},
- 'vxlan-learning' :
- {'help' : 'vxlan learning yes/no',
- 'validvals' : ['yes', 'no', 'on', 'off'],
-@@ -123,6 +126,13 @@ class vxlan(moduleBase):
- vxlan._clagd_vxlan_anycast_ip = clagd_vxlan_list[0]
-
- self._set_global_local_ip(ifaceobj)
-+
-+ # If we should use a specific underlay device for the VXLAN
-+ # tunnel make sure this device is set up before the VXLAN iface.
-+ physdev = ifaceobj.get_attr_value_first('vxlan-physdev')
-+ if physdev:
-+ return [ physdev ]
-+
- return None
-
- def _set_global_local_ip(self, ifaceobj):
-@@ -184,6 +194,7 @@ class vxlan(moduleBase):
- self.syntax_check_localip_anycastip_equal(ifname, local, anycastip)
- # if both local-ip and anycast-ip are identical the function prints a warning
-
-+ physdev = ifaceobj.get_attr_value_first('vxlan-physdev')
- ageing = ifaceobj.get_attr_value_first('vxlan-ageing')
- vxlan_port = ifaceobj.get_attr_value_first('vxlan-port')
- purge_remotes = self._get_purge_remotes(ifaceobj)
-@@ -291,7 +302,8 @@ class vxlan(moduleBase):
- learning=learning,
- ageing=ageing,
- group=group,
-- dstport=vxlan_port)
-+ dstport=vxlan_port,
-+ physdev=physdev)
- except Exception as e_netlink:
- self.logger.debug('%s: vxlan netlink: %s' % (ifname, str(e_netlink)))
- try:
-@@ -463,6 +475,11 @@ class vxlan(moduleBase):
- self._query_check_n_update(ifaceobj, ifaceobjcurr, 'vxlan-ageing',
- ageing, vxlanattrs.get('ageing'))
-
-+ physdev = ifaceobj.get_attr_value_first('vxlan-physdev')
-+ if physdev:
-+ self._query_check_n_update(ifaceobj, ifaceobjcurr, 'vxlan-physdev',
-+ physdev, vxlanattrs.get('physdev'))
-+
- def _query_running(self, ifaceobjrunning):
- vxlanattrs = self.ipcmd.get_vxlandev_attrs(ifaceobjrunning.name)
- if not vxlanattrs:
-diff --git a/ifupdown2/ifupdown/netlink.py b/ifupdown2/ifupdown/netlink.py
-index 17672c2..516d39c 100644
---- a/ifupdown2/ifupdown/netlink.py
-+++ b/ifupdown2/ifupdown/netlink.py
-@@ -252,7 +252,7 @@ class Netlink(utilsBase):
- % (ifacename, vlanid, str(e)))
-
- def link_add_vxlan(self, ifacename, vxlanid, local=None, dstport=VXLAN_UDP_PORT,
-- group=None, learning=True, ageing=None):
-+ group=None, learning=True, ageing=None, physdev=None):
- cmd = 'ip link add %s type vxlan id %s dstport %s' % (ifacename,
- vxlanid,
- dstport)
-@@ -260,16 +260,20 @@ class Netlink(utilsBase):
- cmd += ' ageing %s' % ageing if ageing else ''
- cmd += ' remote %s' % group if group else ' noremote'
- cmd += ' nolearning' if not learning else ''
-+ cmd += ' dev %s' % physdev if physdev else ''
- self.logger.info('%s: netlink: %s' % (ifacename, cmd))
- if ifupdownflags.flags.DRYRUN: return
- try:
-+ if physdev:
-+ physdev = self.get_iface_index (physdev)
- return self._nlmanager_api.link_add_vxlan(ifacename,
- vxlanid,
- dstport=dstport,
- local=local,
- group=group,
- learning=learning,
-- ageing=ageing)
-+ ageing=ageing,
-+ physdev=physdev)
- except Exception as e:
- raise Exception('netlink: %s: cannot create vxlan %s: %s'
- % (ifacename, vxlanid, str(e)))
-
-diff --git a/ifupdown2/ifupdownaddons/LinkUtils.py b/ifupdown2/ifupdownaddons/LinkUtils.py
-index ae541e9..8605704 100644
---- a/ifupdown2/ifupdownaddons/LinkUtils.py
-+++ b/ifupdown2/ifupdownaddons/LinkUtils.py
-@@ -507,18 +507,21 @@ class LinkUtils(utilsBase):
- linkattrs['kind'] = 'vxlan'
- vattrs = {'vxlanid': citems[i + 2],
- 'svcnode': None,
-+ 'physdev': None,
- 'remote': [],
- 'ageing': citems[i + 2],
- 'learning': 'on'}
- for j in range(i + 2, len(citems)):
- if citems[j] == 'local':
- vattrs['local'] = citems[j + 1]
-- elif citems[j] == 'remote':
-+ elif citems[j] == 'group':
- vattrs['svcnode'] = citems[j + 1]
- elif citems[j] == 'ageing':
- vattrs['ageing'] = citems[j + 1]
- elif citems[j] == 'nolearning':
- vattrs['learning'] = 'off'
-+ elif citems[j] == 'dev':
-+ vattrs['physdev'] = citems[j + 1]
- linkattrs['linkinfo'] = vattrs
- break
- elif citems[i] == 'vrf' and citems[i + 1] == 'table':
-diff --git a/ifupdown2/nlmanager/nlmanager.py b/ifupdown2/nlmanager/nlmanager.py
-index e4a5892..14f7066 100644
---- a/ifupdown2/nlmanager/nlmanager.py
-+++ b/ifupdown2/nlmanager/nlmanager.py
-@@ -969,7 +969,7 @@ class NetlinkManager(object):
- return self.tx_nlpacket_get_response(nbr)
-
- def link_add_vxlan(self, ifname, vxlanid, dstport=None, local=None,
-- group=None, learning=True, ageing=None):
-+ group=None, learning=True, ageing=None, physdev=None):
-
- debug = RTM_NEWLINK in self.debug
-
-@@ -980,6 +980,8 @@ class NetlinkManager(object):
- info_data[Link.IFLA_VXLAN_LOCAL] = local
- if group:
- info_data[Link.IFLA_VXLAN_GROUP] = group
-+ if physdev:
-+ info_data[Link.IFLA_VXLAN_LINK] = int (physdev)
-
- info_data[Link.IFLA_VXLAN_LEARNING] = int(learning)
-
-
---
-2.11.0
-
-From 849e8213baa8483604a0de6a59695fd3dd98b248 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Mon, 14 May 2018 16:36:58 +0200
-Subject: [PATCH 3/4] config tuning
+Subject: [PATCH] config tuning
allow ovs_... options:
addon_syntax_check=0
ifreload_down_changed=1
---
- etc/network/ifupdown2/ifupdown2.conf | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
+ etc/network/ifupdown2/ifupdown2.conf | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/etc/network/ifupdown2/ifupdown2.conf b/etc/network/ifupdown2/ifupdown2.conf
-index 906fdea..aa7f120 100644
+index 906fdea..3acc203 100644
--- a/etc/network/ifupdown2/ifupdown2.conf
+++ b/etc/network/ifupdown2/ifupdown2.conf
@@ -29,12 +29,12 @@ disable_cli_interfacesfile=0
-From 8ae199ef085b051038427f47fba0c719deda4a30 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Mon, 14 May 2018 17:06:52 +0200
Subject: [PATCH] manual interfaces : set link up
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/ifupdown2/ifupdown/ifupdownmain.py b/ifupdown2/ifupdown/ifupdownmain.py
-index 3c72429..f1cd2fd 100644
+index 45391ee..2daf49f 100644
--- a/ifupdown2/ifupdown/ifupdownmain.py
+++ b/ifupdown2/ifupdown/ifupdownmain.py
-@@ -90,11 +90,6 @@ class ifupdownMain(ifupdownBase):
+@@ -97,11 +97,6 @@ class ifupdownMain(ifupdownBase):
(ifaceobj.link_privflags & ifaceLinkPrivFlags.VRF_SLAVE)):
self._keep_link_down(ifaceobj)
return
if self._delay_admin_state:
self._delay_admin_state_iface_queue.append(ifaceobj.name)
return
-@@ -127,11 +122,6 @@ class ifupdownMain(ifupdownBase):
+@@ -134,11 +129,6 @@ class ifupdownMain(ifupdownBase):
# there is no real interface behind it
if ifaceobj.type == ifaceType.BRIDGE_VLAN:
return
if self._delay_admin_state:
self._delay_admin_state_iface_queue.append(ifaceobj.name)
return
-@@ -520,10 +510,7 @@ class ifupdownMain(ifupdownBase):
+@@ -527,10 +517,7 @@ class ifupdownMain(ifupdownBase):
def _set_iface_role_n_kind(self, ifaceobj, upperifaceobj):
# If addr_method is set and link is not a logical interface,
- # logical interfaces.
- if (ifaceobj.addr_method == 'manual' and not ifaceobj.link_kind):
- ifaceobj.link_privflags |= ifaceLinkPrivFlags.KEEP_LINK_DOWN
-+ # set flag KEEP_LINK_DOWN.
++ # set flag KEEP_LINK_DOWN.
if (upperifaceobj.link_kind & ifaceLinkKind.BOND):
self._set_iface_role(ifaceobj, ifaceRole.SLAVE, upperifaceobj)
-From fc168d1897cefd4781722af58f856b2686074d0d Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Wed, 16 May 2018 02:11:45 +0200
Subject: [PATCH] don't remove (tap|veth|fwpr) interfaces from bridge on ifup
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
-index 7c582e9..e294c95 100644
+index 02cbebf..9140735 100644
--- a/ifupdown2/addons/bridge.py
+++ b/ifupdown2/addons/bridge.py
-@@ -944,7 +944,7 @@ class bridge(moduleBase):
+@@ -954,7 +954,7 @@ class bridge(moduleBase):
runningbridgeports = self.brctlcmd.get_bridge_ports(ifaceobj.name)
if runningbridgeports:
for bport in runningbridgeports:
-From c77ca88f7d08789bddc4b43bafa23b38c0bd2d64 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Fri, 15 Jun 2018 00:36:03 +0200
Subject: [PATCH] add dummy mtu, bridgevlanport modules
(ifupdown2 don't launch an ifdown script, if an ifupdown2 addon script
exist with same name)
---
- etc/network/ifupdown2/addons.conf | 3 +++
+ etc/network/ifupdown2/addons.conf | 2 ++
ifupdown2/addons/bridgevlanport.py | 17 +++++++++++++++++
ifupdown2/addons/mtu.py | 17 +++++++++++++++++
- 3 files changed, 37 insertions(+)
+ 3 files changed, 36 insertions(+)
create mode 100644 ifupdown2/addons/bridgevlanport.py
create mode 100644 ifupdown2/addons/mtu.py
diff --git a/etc/network/ifupdown2/addons.conf b/etc/network/ifupdown2/addons.conf
-index c0d1ce9..955b7d5 100644
+index c0d1ce9..16b57ec 100644
--- a/etc/network/ifupdown2/addons.conf
+++ b/etc/network/ifupdown2/addons.conf
@@ -13,6 +13,8 @@ up,dhcp
post-up,usercmds
post-up,clagd
post-up,vxrd
-@@ -33,3 +35,4 @@ post-down,vlan
- post-down,bond
- post-down,usercmds
- post-down,link
-+
diff --git a/ifupdown2/addons/bridgevlanport.py b/ifupdown2/addons/bridgevlanport.py
new file mode 100644
index 0000000..ab6a680
extra/0001-addons-scripts-fix-ENV-for-interfaces-options.patch
-extra/0003-add-vxlan-physdev-support.patch
+extra/0002-add-vxlan-physdev-support.patch
pve/0001-config-tuning.patch
pve/0002-manual-interfaces-set-link-up.patch
pve/0003-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch