]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
Merge branch 'master' into python3
authorJulien Fortin <julien@cumulusnetworks.com>
Thu, 26 Mar 2020 02:02:53 +0000 (03:02 +0100)
committerJulien Fortin <julien@cumulusnetworks.com>
Thu, 26 Mar 2020 02:02:53 +0000 (03:02 +0100)
* master:
  addons: address: process MTU before addrgen and adddresses
  ifupdownmain: support for marking interfaces as mgmt interfaces
  addons: bridge: fix TypeError: sequence item 0: expected string, int found
  addons: bridge: set bridge MTU after bridge creation addons: bridge: get bridge MTU from address policy not bridge
  addons: mstpctl: check mstpctl-stp and bridge-stp and fix bridge cache update
  lib: nlcache: fix dry_run exception
  addons: address: add support for a separate default mtu policy for eth interfaces
  debian: changelog: new 2.0.2-1 entry
  addons: ethtool: add support for "ethtool_ignore_errors" policy
  LinkUtils: mac_str_to_int: fix string to int conversion
  addons: dhcp: if mgmt vrf context exec dhclient in default vrf

1  2 
debian/changelog
ifupdown2/__init__.py
ifupdown2/addons/address.py
ifupdown2/addons/bridge.py
ifupdown2/addons/dhcp.py
ifupdown2/addons/ethtool.py
ifupdown2/addons/mstpctl.py
ifupdown2/lib/nlcache.py

index 1fd216e7ffb564adf794c09b2e3eedd9ebcd40c2,e27836cc82086dd05a92a1b454d08e0768932602..77d5f229ba4f737f001e35f0e4b09e934f9e9e61
@@@ -1,13 -1,14 +1,24 @@@
 +ifupdown2 (3.0.0-1) unstable; urgency=medium
 +
 +   * New. Enabled: python3 support
 +   * New. Enabled: support for marking interfaces as mgmt interfaces
 +   * Fix: dry-run exceptions
 +   * Fix: set bridge MTU after bridge creation
 +   * Fix: tunnel configuration compatibility with ifupdown1 (closes: #133)
 +
 + -- Julien Fortin <julien@cumulusnetworks.com>  Tue, 31 Dec 2019 23:42:42 +0100
 +
+ ifupdown2 (2.0.2-1) unstable; urgency=medium
+   * New: addons: ethtool: add support for "ethtool_ignore_errors" policy
+   * New: addons: dhcp: if mgmt vrf context exec dhclient in default vrf
+   * Fix: nlpacket: don't raise an exception on 24 bytes mac address (#140)
+   * Fix: IFLA_INFO_KIND: decode tunnel data
+   * Fix: XFRM for 2.x release
+   * Fix: addons.conf: remove duplicate entry for tunnel pre-up
+  -- Julien Fortin <julien@cumulusnetworks.com>  Wed, 04 Mar 2020 23:42:42 +0100
  ifupdown2 (2.0.1-1) unstable; urgency=medium
  
    * New argv option: --nldebug to print netlink debug message
index c1dc200f9bbee03b839e01f550cccca6f8ed9462,fe3ec89ea0072057d5ccb0611f632a8766002968..2357475687578191252c69a250e7f502d918599e
@@@ -1,7 -1,7 +1,7 @@@
 -#!/usr/bin/env python
 +#!/usr/bin/env python3
  # -*- coding: utf-8 -*-
  
- __version__ = '2.0.0'
+ __version__ = '2.0.2'
  
  # Copyright (C) 2014,2015,2016,2017,2018,2019 Cumulus Networks, Inc. All rights reserved
  #
index 5ce8b8e5e0f4f5443b638e3ddea7afaece56f685,f84fac5d1eff469100e41934a42bab50918d0fe5..695a86736b282caef367b98eba39b8bb9ef33722
@@@ -980,9 -989,8 +981,8 @@@ class address(Addon, moduleBase)
              # (if intf was moved from static config to dhcp)
              for old_ifaceobj in statemanager.statemanager_api.get_ifaceobjs(ifaceobj.name) or []:
                  for addr in old_ifaceobj.get_attr_value("address") or []:
 -                    self.netlink.addr_del(ifaceobj.name, IPNetwork(addr))
 +                    self.netlink.addr_del(ifaceobj.name, ipnetwork.IPNetwork(addr))
  
-         self.process_mtu(ifaceobj, ifaceobj_getfunc)
  
          try:
              self.process_hwaddress(ifaceobj)
Simple merge
index 1fe1aa463d3b3e4b385174d79addce773edb3e25,3f04a60b34fa8ef796793d005b94dad45475b087..1877a116e27869004cfc7f18be431ff7d9468567
@@@ -39,13 -39,14 +39,20 @@@ class dhcp(Addon, moduleBase)
          Addon.__init__(self)
          moduleBase.__init__(self, *args, **kargs)
          self.dhclientcmd = dhclient(**kargs)
 +        vrf_id = self._get_vrf_context()
 +        if vrf_id and vrf_id == 'mgmt':
 +            self.mgmt_vrf_context = True
 +        else:
 +            self.mgmt_vrf_context = False
 +        self.logger.info('mgmt vrf_context = %s' %self.mgmt_vrf_context)
  
+         vrf_id = self._get_vrf_context()
+         if vrf_id and vrf_id == 'mgmt':
+             self.mgmt_vrf_context = True
+         else:
+             self.mgmt_vrf_context = False
+         self.logger.info('mgmt vrf_context = %s' %self.mgmt_vrf_context)
      def syntax_check(self, ifaceobj, ifaceobj_getfunc):
          return self.is_dhcp_allowed_on(ifaceobj, syntax_check=True)
  
index 42852214b5b75a0e46b8f2ef943c1e958eafed07,fde652fab8e23262fc575855230b567cb33da082..9e40a23762c90b2c52c9a3797502f7c18664e3d2
@@@ -162,9 -162,14 +162,14 @@@ class ethtool(Addon, moduleBase)
                      cmd = ('%s -K %s %s %s' %
                              (utils.ethtool_cmd, ifaceobj.name, eth_name, config_val))
                      utils.exec_command(cmd)
 -                except Exception, e:
 +                except Exception as e:
                      self.log_error('%s: %s' %(ifaceobj.name, str(e)), ifaceobj)
  
+         self.ethtool_ignore_errors = policymanager.policymanager_api.get_module_globals(
+             module_name=self.__class__.__name__,
+             attr='ethtool_ignore_errors'
+         )
      def do_fec_settings(self, ifaceobj):
          feccmd = ''
  
Simple merge
index acca4ad4f60f69099d00f50e60cee5fd0394f6ff,258c7eea2dd9e331e92d97d1df9e68895ff5f863..73266590e6b04b5fcfc2b0688a449a0790233d86
@@@ -2743,11 -2791,10 +2743,10 @@@ class NetlinkListenerWithCache(nllisten
                  Link.IFLA_INFO_KIND: "bridge",
                  Link.IFLA_INFO_DATA: ifla_info_data
              })
 -            link.build_message(self.sequence.next(), self.pid)
 +            link.build_message(next(self.sequence), self.pid)
              result = self.tx_nlpacket_get_response_with_error(link)
  
-             if link_just_created:
-                 self.cache.update_link_info_data(ifname, ifla_info_data)
+             self.cache.update_link_info_data(ifname, ifla_info_data)
  
              return result
          except Exception as e: