1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

1250 Commits

Author SHA1 Message Date
516fd7266f python3: update debian files to build python3 deb
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-08 12:22:58 +01:00
0e936c3ffa python3: replacing ipaddr with custom ipnetwork.IPNetwork object
As mentioned in a previous commit:
python3 ipaddress behave differently from python2-ipaddr, this is
a serious problem for us since it breaks most of the ip addresses
code.

>>> import ipaddress
>>> ipaddress.ip_network("10.10.10.242/10", False)
IPv4Network('10.0.0.0/10')

This is a problem for us, so we need to use a custom IPNetwork object.
Our custom IPNetwork object uses ipaddress.IPAddress under the hood

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-08 11:09:08 +01:00
447796a6c3 python3: ethtool: port offload code to python3
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-02 15:53:12 +01:00
3aa8da8a6c Merge branch 'master-next' into python3
* master-next:
  argv: move --nldebug option to common_argparse to avoid exception in ifreload
  debian: changelog: new 2.0.1-1 entry
  argv: add new command line argument --nldebug
  This commit adds the feature to change offloads for nics. Currently GRO, LRO GSO, TSO, UFO, TX and RX Offload are supported.
2020-01-02 15:50:51 +01:00
8e9960454d argv: move --nldebug option to common_argparse to avoid exception in ifreload
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-31 20:26:46 +01:00
e65fae4889 debian: changelog: new 2.0.1-1 entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2.0.1-1
2019-12-31 15:25:07 +01:00
9e4c83547c argv: add new command line argument --nldebug
if --nldebug is provided, netlink debug message will be printed

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-31 15:15:15 +01:00
da9915399f Merge branch 'master' into master-next
* master:
  This commit adds the feature to change offloads for nics. Currently GRO, LRO GSO, TSO, UFO, TX and RX Offload are supported.
2019-12-30 15:59:15 +01:00
e1b7bcd382 Merge pull request #118 from svenauhagen/feature/offload
This commit adds the feature to change offloads for nics
2019-12-30 15:36:19 +01:00
66f27594a4 python3: fixes for batman_adv, ppp and xfrm addons
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 18:27:22 +01:00
d053bb48c5 debian: postinst: remove apt install, add log message instead 2019-12-17 18:26:58 +01:00
8248d0befc debian: postinst: add work-around to manually install python3-ipaddr
python3 ipaddress behave differently from python2-ipaddr, this is
a serious problem for us since it breaks most of the ip addresses
code. The work around install the python3-ipaddr via pip3 (and
installs pip3 if necessary). The workaround will stay in the code
util the ipaddress issue is fixed.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:38:25 +01:00
45864399b0 Revert "python3: ipaddress is now part of the standard library (removing python-ipaddr)"
This reverts commit 5dded70eaa1be660f80ebb50bfdb35e86d7e1fac.
2019-12-17 17:35:51 +01:00
5dded70eaa python3: ipaddress is now part of the standard library (removing python-ipaddr)
IPNetwork doesn't exists anymore and is replaced by ip_network. IPv?Network (4 and 6)
objects take an optional argument "strict" that defaults to True. If strict is set
and the ip address has the host bit set it will raise an exception. This is bad
for ifupdown2, so we need to replace all calls to IPNetwork and IPv?Network with
function who will set strict to False. That way we can limit the number of changes
for this patch.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:27:51 +01:00
964e8e5c2f python3: comment out traceback.print_exc in main exception
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:26:25 +01:00
bd441a519d python3: pypi support: except ImportError and ModuleNotFoundError
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:25:32 +01:00
7e9990b1e8 setup.py: bump version to 3.0.0 and update changelog
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:23:13 +01:00
e36ad206ac python3: utils.exec_command now returns str and not bytes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:20:27 +01:00
166bc29384 python3: scheduler: comment out traceback.print_exc
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:20:02 +01:00
6f89e48939 python3: scheduler: python3 set can't handle None value
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:19:55 +01:00
9dfc8a4446 addons: bridge: use string.replace.split instead of regex.split()
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:19:51 +01:00
c817ba4d53 python3: bridge: use integer python3 division instead of float division
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:19:46 +01:00
c3231ed0f1 addons: addressvirtual: fix ifquery output if no address is found on the macvlan
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:19:24 +01:00
a73adcd99f python3: popen.communicate returns bytes (str are expected)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:19:18 +01:00
eea20c9dff python3: nlpacket: encode_ipv4: convert to string before converting to bytes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:19:12 +01:00
c46af1c992 python3: logging: the 'warn' method is deprecated, use warning instead
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:19:05 +01:00
c8eec61e41 python3: nlpacket: importing python3 fixes from nlmanager repo
more fixes for strings/bytes, netlink packet pack/unpack and
python3 floating division

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:16:30 +01:00
997910cd2a python3: nlmanager: fix sequence.next() call
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:09:17 +01:00
f508b51eb1 python3: mstpctlutils: .strip() expects bytes and not a string
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:08:29 +01:00
fefbda193d python3: nlpacket: LINKINFO: info_kind as a string not bytes
The rest of the code expects link kind to be a string(str) and not bytes

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:02:34 +01:00
2ead3536f2 python3: nlpacket: LINKINFO: workaround: converting strings to bytes and ignoring NoneType
Not sure why there's NoneType objects here...

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:01:18 +01:00
47881fc0bb python3: nlcache: keeping ifname as str (and not bytes) to keep the cache working with minimal disruption
Spoiler alert: it is still super disrupted.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:01:12 +01:00
b47b030330 python3: nlcache: can't compare NoneType with integer using > or < anymore
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:01:04 +01:00
90f5a2d19e python3: nlpacket: BRPORT: decode: convert data to byte before unpacking
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:01:00 +01:00
b38555c4df python3: modulebase: subprocess APIs now return bytes instead of strings
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:00:51 +01:00
502eb02334 python3: scheduler: add traceback.print_exc for debugging
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:00:45 +01:00
15b329c571 python3: addons: bridge: add traceback for debugging
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:00:23 +01:00
6ab519dd59 python3: ch.communicate input should be bytes not str
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:00:16 +01:00
c9496c0ae4 python3: nlpacket: fix str vs bytes errors
python2 uses strings but python3 mainly uses bytes, and it's a mess...

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:59:56 +01:00
7f87d9d869 python3: nlcache: cache key (ifname) should of type str not bytes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:59:39 +01:00
54de334242 python3: statemanager: use open call in binary mode
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:59:25 +01:00
97b96fdd22 python3: add traceback.print_exc to help debugging
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:59:18 +01:00
7f208e5670 python3: replace python2 map with loops
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:58:25 +01:00
3b01ed7618 python3: 2to3 changes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:55:49 +01:00
35681c0608 python3: shebang update
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:40:10 +01:00
223ba5af1d ifupdown2 2.0.0-1
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 13:46:18 +01:00
8ebee96099 Merge pull request #121 from aderumier/arpaccept
add arp-accept option.
2019-10-24 16:21:29 -07:00
5e30d3b545 ifupdownmain: detect interfaces no longer configured but pick up by regexes
This patch will detect interfaces that were removed from /etc/network/interfaces
but still got pick up by a regex (i.e. bridge-port vni*) and manually remove
those interfaces from internal data-structures (i.e. dependency graph).

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:53:33 +02:00
224f1db80d ifupdown: log: drop comments
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:52:05 +02:00
1589716377 addons: address: if hwaddress changed delete old fdb entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:51:45 +02:00