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

1229 Commits

Author SHA1 Message Date
8598c690e3 lib: nlcache: fix dry_run exception
Ticket: CM-28312
Testing Done: Test from the ticket

error: link_set_bridge_info_data_dry_run() takes exactly 3 arguments (4 given)
error: link_set_brport_with_info_slave_data_dry_run() got an unexpected keyword argument 'kind'

seems like when updating a method, it's associated dry-run method wasn't
updated accordingly. Maybe there is a way to programmatically check that
I will look into it.

warning: bridge: skipping port X invalid ether addr
warning: interface not recognized - please check interface configuration
Won't show on dry-run anymore

Log info for commands executed with utils.exec_command() weren't prefixed with
DRY-RUN.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-03-26 00:38:54 +01:00
866c818344 addons: address: add support for a separate default mtu policy for eth interfaces
New module global policy mgmt_intf_mtu for mgmt interace mtu:
$cat /var/lib/ifupdown2/policy.d/address.json
{
    "address": {
        "module_globals": {
            "enable_l3_iface_forwarding_checks": "yes",
            "vlan_aware_bridge_address_support": "no",
            "l3_intf_arp_accept": "1",
            "mgmt_intf_mtu": "1500"
        },
        "defaults": {
            "mtu": "9216",
            "ip-forward": "on",
            "ip6-forward": "on"
        }
    }
}

If not specified mgmt_intf_mtu becomes equal to the mtu from defaults
section.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-03-26 00:02:58 +01:00
f43edf057e debian: changelog: new 2.0.2-1 entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-03-04 16:24:50 +01:00
5ca7021683 Merge branch 'master' into master-next
* master:
  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
2020-03-04 16:16:30 +01:00
46c2e97909 nlpacket: don't raise an exception on 24 bytes mac address (#140)
This is a place holder until a proper fix is added.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-02-20 15:21:31 +01:00
87f30e59ac Merge pull request #139 from svenauhagen/bugfix/ipip6
This also adds ipip6 to nlpacket IFLA_INFO_KIND.
2020-02-04 15:46:21 +01:00
cb61aad1d9 This also adds ipip6 to nlpacket IFLA_INFO_KIND. 2020-02-04 13:51:42 +01:00
68ec847b07 Merge pull request #136 from svenauhagen/bugfix/xfrm
This patch fixes the XFRM addon for ifupdown2 version 2.
2020-02-03 17:16:42 +01:00
8dcaeb6439 Add XFRM to IFLA_INFO_KIND and reverse change to iproute2 class. 2020-02-03 17:06:32 +01:00
69015cb30b Merge remote-tracking branch 'upstream/master-next' into bugfix/xfrm 2020-02-03 17:06:15 +01:00
51d0d2e477 nlmanager: nlpacket: add "ip6ip6" link kind to LINKINFO encode handler
Alternative to patch proposed in PR#137

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-02-03 15:23:37 +01:00
6552d825e0 This patch fixes the XFRM addon for ifupdown2 version 2.
The nlpacket for XFRM had a bug, I also changed iproute2 to add
the XFRM interface to the local cache after creation.
Since XFRM has no IFLA_LINKINFO I made the argument optional.
Otherwise no further operation will be done like adding an IP.

I also removed an unecessary variable in the addon.

Signed-off-by: Sven Auhagen <sven.auhagen@voleatech,de>
2020-02-03 14:23:44 +01:00
040192991d nlpacket: add tunnel link_kind to encode support list
fixing: TypeError: cannot concatenate 'str' and 'NoneType' objects

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-28 11:56:19 +01:00
da5b9a569c addons.conf: remove duplicate entry for tunnel pre-up
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-28 11:55:52 +01:00
67c84dad3f addons: address: convert ip addresses from statemanager to IPNetwork objects
Ticket: CM-27841
Reviewed By: Roopa
Testing Done: tests from the CM

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-21 09:30:26 +01:00
9873823902 main: add extra log info to output the exit status
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-21 09:29:09 +01:00
c1b6ffc78c addons: ethtool: add support for "ethtool_ignore_errors" policy
The goal of this policy is to ignore ethtool related errors, this is
useful for specific scenario like VMs.
This policy is off by default. To turn it on simply set:

"module_globals" : {
    "ethtool_ignore_errors": true
}

under the ethtool top object.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-21 09:20:41 +01:00
22c85b2da9 LinkUtils: mac_str_to_int: fix string to int conversion
The previous implementation failed to properly convert
mac address with missing leading-zeros.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-21 09:15:58 +01:00
9d817e967e addons: dhcp: if mgmt vrf context exec dhclient in default vrf
If we are running in mgmt vrf context and vrf is not specified
on the dhcp interface, use ip vrf exec to start dhclient in the
default context

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-21 09:09:57 +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
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
ff775ef150 addons: bond: enable ipv6 on brports before bond enslaving
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:51:34 +02:00
97fc046b41 addons: vrf: enable_ipv6: rename method and add sysfs check for brport
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:51:24 +02:00
40a693172d reverting the iface.py changes ; addons: vrf: enable ipv6 on slaves
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:51:12 +02:00
986965c169 nlmanager: nlmanager: retry binding tx_socket up to NLMANAGER_BIND_RETRY times
NLMANAGER_BIND_RETRY env variable defaults to 4242

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:49:42 +02:00
2e2dcdaf36 addons: address: remove old ip address when intf is moved to dhcp
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:49:21 +02:00
d92f630c59 addons: vrf: enable ipv6 on vrf slaves when moved from bport
Remove/add swp2 from br0 and vrf blue

auto swp2
iface swp2
      vrf blue

auto br0
iface br0
      bridge-ports swp1
      address 10.0.0.11/24
      bridge-vlan-aware no

auto blue
iface blue
      vrf-table auto

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:48:59 +02:00
f5c47abf3d LinkUtils: convert ip addrs to string before comparing them
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:48:26 +02:00
89f5bbe52c ifupdownmain: ifquery check read_iface_config errors
auto swp1
iface swp1
      typo_attribute 42

$ ifquery -ac
error: /etc/network/interfaces: line9: iface swp1: unsupported keyword (typo_attribute)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp                                                [pass]

auto swp1
iface swp1

$ echo $?
1
$
$ echo $?
1
$ ifup -a
error: /etc/network/interfaces: line9: iface swp1: unsupported keyword (typo_attribute)
$ echo $?
1
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:47:29 +02:00
45db39f606 add arp-accept option.
Currently, the only way to enable arp-accept is to enable
a policy with l3_intf_arp_accept.

But this enable arp-accept for all bridges.

This option allow to define it for specific bridge.

This is needed with bgp-evpn and vm migration
https://github.com/FRRouting/frr/issues/4904
2019-09-03 09:43:38 +02:00
ebd1f30695 This commit adds the feature to change offloads for nics.
Currently GRO, LRO GSO, TSO, UFO, TX and RX Offload are supported.

One can read the current value with ethtool -k NICNAME.
Values are set with ethtool -K NICNAME gro on lro on gso on tso on ufo on tx on rx on

An example for the config file is:

iface eth0 static
	gro-offload no

The default value will be kept in the statemanager. The default value might differ depending on the NIC and is saved upon the first change.
2019-07-30 19:59:34 +02:00
5e8a4802f1 setup.py: bumping version from 1.2.5 to 1.2.9
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-24 23:55:19 +02:00
5fb588fc9a debian: changelog: add empty 1.2.9-1 entry for next release
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-12 12:47:06 +04:00
79ba6a415a debian: changelog: add new changelog entry 1.2.8-1
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-12 12:22:36 +04:00
a6f6c8b2ad addons: dhcp: PEP8 fixes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-12 12:22:10 +04:00
d0df31ff9d Merge pull request #116 from rajendra-dendukuri/dhcp6_duid
addons: dhcp: Policy to specify DUID type to use on dhcpv6 requests
2019-07-12 12:18:02 +04:00
1321d5e357 addons: dhcp: Policy to specify DUID type to use on dhcpv6 requests
Update module description and changelog

Signed-off-by: Rajendra Dendukuri <rajendra.dendukuri@broadcom.com>
2019-07-10 22:43:28 -07:00
cf1dac2ff7 debian: changelog: add new 1.2.7-1 entry
* New: Add bridge-ports-condone-regex option (closes #117)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-09 19:28:33 +04:00
f5c97c0d6b Add bridge-ports-condone-regex option (closes #117)
The bridge-ports-condone-regex option can be used to tell ifupdown2 to let
  some bridge member ports alone and do not remove them on ifreload runs.
  This might come in handy when running a KVM (or any other virtualization
  system) host with a bridged network setup.

  Before this option, ifupdown2 would either complain about not existing
  member ports when setting up the bridge (if all VM interfaces were to
  be specified in /etc/network/interfaces) or remove any VM interface
  from a bridge if it was not specified in /e/n/i.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Co-authored-by: Julien Fortin <julien@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-09 19:22:52 +04:00
f62cfb7b95 addons: dhcp: Policy to specify DUID type to use on dhcpv6 requests
Add a ifupdown2 policy attribute dhcp6-duid to allow user to specify the DUID type
to be used on an IPv6 enabled interface.

Signed-off-by: Rajendra Dendukuri <rajendra.dendukuri@broadcom.com>
2019-07-06 15:14:38 -07:00
c9091d7108 debian: changelog: updating 1.2.6-1 entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-06-24 15:52:06 +08:00
ee0075399a addons: addressvirtual: keep macvlan down if link-down specified on lower device
auto vlan1755
iface vlan1755
        address 172.21.7.42/29
	address-virtual 00:00:5E:00:01:41 172.21.7.41/29
	link-down yes
	vlan-id 1755
	vlan-raw-device bridge

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-06-24 15:39:46 +08:00