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

1562 Commits

Author SHA1 Message Date
Julien Fortin
872e4a6ec2 nlcache: master_slaves data-structure should use lists instead of sets
nlcache used a set to keep a master's slave list. This wasn't the right
choice as sets can't guarantee ordering. We need to keep an ordered list
of ports.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2021-01-25 19:25:25 +01:00
Andy Roulin
c7c7ce8c4d dhclient: use absolute path for sysfs carrier node
Signed-off-by: Andy Roulin <aroulin@nvidia.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2021-01-25 19:23:12 +01:00
Andy Roulin
f12bef8ba9 dhclient: check for out variable being None
Fixes: 765075ba392 ("dhclient: wait to start dhcp if carrier is down")
Signed-off-by: Andy Roulin <aroulin@nvidia.com>
2021-01-25 19:20:50 +01:00
Andy Roulin
1eacb76b3a dhclient: wait to start dhcp if carrier is down
This prevents DHCP requests failures taking time during
boot if the interface isn't up yet. If the interface is
down, dhclient will fail to send packets.

At boot-time, enslaving an interface to vrf flaps it. By
waiting for the interface to come back up before starting
dhclient reduces time to boot.

Reviewed-by: CCR-10987
Closes: CM-32460
Co-developed-by: Nilesh Shinde <nilesh@nvidia.com>
Signed-off-by: Andy Roulin <aroulin@nvidia.com>
2021-01-25 19:20:28 +01:00
Julien Fortin
dba88be45a template: update error message for python3-mako
since we've updated ifupdown2 to pytho3 the error
message should mention python3-mako and not
python-mako (python2)

Ticket: CM-29621
Reviewed By: Roopa

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2021-01-25 19:17:50 +01:00
Julien Fortin
adb4386268 addons: dhcp: don't release dhcp lease after timeout
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2021-01-25 19:15:28 +01:00
Julien Fortin
a6353bfb74 addons: addressvirtual: sync macvlan forwarding state with lower-device
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2021-01-25 19:12:41 +01:00
Julien Fortin
909377598e addons: mtu: policy: accept integer value for mtu in policy file
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2021-01-25 19:11:01 +01:00
Julien Fortin
190cf3e6eb addons: address: enable ipv6 before adding new address
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2021-01-25 19:10:05 +01:00
Julien Fortin
6860da4441 Merge pull request #180 from CumulusNetworks/issue-179/forwarding-disabled-on-dhcp-bridge
addons: bridge: enable forwarding on dhcp bridges (fixes: #179)
2021-01-25 19:03:58 +01:00
tjjh89017
912b8697d4 networking.service: fix start networking.service before network is marked online
In debian 10, ifupdown2 didn't ensure that it will start before network.target and network-online.target.
after local-fs.target because ifupdown2 need to read config file from local filesystem
Other network services will not start after networking.service and fail because no interface is up.
(e.g isc-dhcp-server, tftp-hpa)
2021-01-20 17:22:24 +08:00
Julien Fortin
0305c4125f Merge pull request #185 from moepman/cleanup-batman-adv
Cleanup batman adv
2020-11-23 16:06:18 +01:00
Julien Fortin
cd67f88f8f Merge pull request #186 from kvadrage/switchdev-fixes
addons: bridge: add support for "bridge_always_up_dummy_brport" policy
2020-11-20 17:37:33 +01:00
Alexander Petrovskiy
1b845b1bab addons: bridge: add support for "bridge_always_up_dummy_brport" policy
User may want to have persistent name of dummy port if
"bridge-always-up" option is enabled.
Now the name can be defined in "bridge_always_up_dummy_brport" policy
for bridge module.

Signed-off-by: Alexander Petrovskiy <alexpe@nvidia.com>
2020-11-20 03:46:59 +03:00
Markus Hauschild
7db69c5b3c addons: batman_adv: drop unnecessary exception clause
The exception could have never come from read_file_oneline, also value
was an undefined variable, so it would have thrown an exception while
handling an exception thus being useless anyway.

Signed-off-by: Markus Hauschild <markus@moepman.eu>
2020-11-19 09:15:15 +01:00
Markus Hauschild
344a97e31d addons: batman_adv: fix netlink call
as suggested by @julienfortin in PR comment

Signed-off-by: Markus Hauschild <markus@moepman.eu>
2020-11-19 09:13:06 +01:00
Julien Fortin
69825bb495 addons: bridge: enable forwarding on dhcp bridges (fixes: #179)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-11-18 14:19:48 +01:00
Markus Hauschild
1dc2c4a7c2 addons: batman_adv: improve readability
Signed-off-by: Markus Hauschild <markus@moepman.eu>
2020-11-17 15:40:27 +01:00
Markus Hauschild
9436b6cb7a addons: batman_adv: fix unresolved reference
Signed-off-by: Markus Hauschild <markus@moepman.eu>
2020-11-17 15:40:27 +01:00
Markus Hauschild
1d9a8d4f6b addons: batman_adv: cleanup according to PEP8
Signed-off-by: Markus Hauschild <markus@moepman.eu>
2020-11-17 15:40:27 +01:00
Julien Fortin
e40c309ff3 Merge pull request #184 from moepman/fix-batman-adv-str
addons: batman_adv: use universal_newlines
2020-11-17 14:53:04 +01:00
Markus Hauschild
a8ea3ce57b addons: batman_adv: use universal_newlines
This prevents the error: a bytes-like object is required, not 'str'

Signed-off-by: Markus Hauschild <markus@moepman.eu>
2020-11-17 00:48:48 +01:00
Julien Fortin
5a3acab3d4 Merge pull request #181 from moepman/fix-vxlan-modinfo
addons: vxlan: fix vxlan-svcnodeip help text
2020-11-16 20:45:46 +01:00
Markus Hauschild
969257a4fb addons: vxlan: fix vxlan-svcnodeip help text
Signed-off-by: Markus Hauschild <markus@moepman.eu>
2020-11-16 18:59:47 +01:00
Piotr Ożarowski
288a88d3e4 bump minimum required debhelper version to 9.20160709
this is required by "--with systemd" in debian/rules
3.0.0-1
2020-09-16 01:10:00 +02:00
Julien Fortin
bb9e353b8a Merge pull request #173 from JackSlateur/ip_repr
nlmanager: fix IPAddress's repr, which must return a str
2020-08-28 16:01:19 +02:00
Alexandre Bruyelles
0044f105ef nlmanager: fix IPAddress's repr, which must return a str
Signed-off-by: Alexandre Bruyelles <abruyelles@odiso.com>
2020-08-27 12:13:55 +02:00
Julien Fortin
c7a0cd032c debian: changelog: updating 3.0.0-1 changelog entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 14:38:41 +02:00
Julien Fortin
5f0ba5190f nlcache: link_del: move log.info after get_ifindex check
if the link doesn't exists get_ifindex will raise an exception
new code in the bridge module simply call link_del on a dummy port
that may not exists. It was a bit confusing to see the log.info
stating that a port was getting removed...

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 14:35:02 +02:00
Julien Fortin
ca43693778 addons: vxlan: new attribute: vxlan-mcastgrp-map
"vxlan-mcastgrp-map": {
    "help": "vxlan multicast group for single-vxlan device",
    "validvals": ["<number-ipv4-list>"],
    "example": ["vxlan-mcastgrp-map 1000=239.1.1.100 1001=239.1.1.200"],
}

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 14:32:07 +02:00
Julien Fortin
792b9a0700 addons: vxlan: add vxlan-mcastgrp support for single-vxlan device
this patch adds support for the vxlan-mcastgrp attribute on single
vxlan device. Prior to this commit the vxlan-mcastgrp was only
applied to regular vxlans.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 14:20:41 +02:00
Julien Fortin
a7e5fb2597 addons: vxlan: fix AttributeError: 'NoneType' object has no attribute 'ip'
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 14:19:58 +02:00
Julien Fortin
caac1e90b0 addons: vxlan: single-vxlan: remove local ip cidr before executing iproute2 link add
When creating a single-vxlan device we were sending local tunnel ip address with ip
network prefix. This patch avoid the following error:

error: cmd '/bin/ip link add dev vxlan0 type vxlan external local 27.0.0.9/32 dstport 4789' failed: returned 1 (Error: any valid address is expected rather than "27.0.0.9/32".
)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 14:17:08 +02:00
Julien Fortin
366da8b334 addons: vrf: removing link-down after slave is removed from a VRF
This was added back when ifupdown2 was using brctl to del bridges.
brctl doesn't allow deleting a bridge if the bridge is still admin up.
Now that we moved to netlink this is not needed anymore.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 14:06:31 +02:00
lcawley
f343240c18 addons: ethtool: add support for 200G and 400G link speeds
Signed-off-by: lcawley <lcawley@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 14:02:15 +02:00
Julien Fortin
1b51e5a6d6 addons: dhcp: skipping dhcp configuration if link-down yes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 13:59:41 +02:00
Julien Fortin
5358dfceb8 addons: dhcp: don't raise an exception after dhcp retry-failure
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 13:57:32 +02:00
Julien Fortin
086351cb7e addons: bridge: remove bridge-mcmi range check
The kernel doesn't seem to enforce any specific range, ifupdown2
shouldn't either.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-08-06 13:57:13 +02:00
Jasperswaagman
6adcd9fe68 Update bridge.py
Readds the `none` value as a valid value for bridge-ports.
2020-07-29 18:01:12 +02:00
Julien Fortin
6d4fd3f017 Merge pull request #154 from CumulusNetworks/issue-43/support-for-vxlan-ipv6-attributes
addons: vxlan: add support for ipv6 attributes svcnodeip6 and mcastgrp6
2020-07-01 16:55:50 +02:00
Julien Fortin
0c019b802d Merge branch 'master' into issue-43/support-for-vxlan-ipv6-attributes 2020-07-01 16:55:38 +02:00
Julien Fortin
ba3c32b097 debian: control: dropping build-depends: dh-systemd
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-06-24 01:44:30 +02:00
Julien Fortin
c4b60e1542 debian: update changelog entry and control: standards-version
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-06-24 01:35:16 +02:00
Julien Fortin
3218f49d81 use "except Exception:" instead of "except:"
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-06-24 01:12:24 +02:00
Julien Fortin
efa80e3043 addons: dhcp: don't enable syslog for ifquery
Ticket: CM-29849
Reviewed By: Roopa

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-06-23 17:46:48 +02:00
Julien Fortin
c742bf43eb Merge branch 'master' of github.com:CumulusNetworks/ifupdown2
* 'master' of github.com:CumulusNetworks/ifupdown2:
  Updated additional packages requirements
2020-06-19 16:42:16 +02:00
Julien Fortin
0eae03e867 Merge pull request #168 from netfreak98/patch-1
Updated additional packages requirements (python3)
2020-06-18 18:58:52 +02:00
Julien Fortin
0e159829a6 lib: iproute2: re-add missing bridge_vlan_add_vid_list method
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-06-18 18:18:00 +02:00
Julien Fortin
5f6de69fd3 lockfile: return a specific exit code when another instance is already running
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-06-18 18:17:12 +02:00
Julien Fortin
7b56575ebd nlcache: force_add_slave: don't update internal data-structure if not needed
force_add_slave was designed to be called right after the link_set_master
call to override our internal cache and not wait for the kernel and register
the slave/master relationship in our internal data-structures. It turns
out the kernel can be faster than us here. So an additional check is needed
to make sure we don't do duplicate operations that would result in the
slave being removed from an internal data-structure.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-06-18 18:16:34 +02:00