Ticket: CM-11811
Reviewed By: roopa, julien
Testing Done: used same configuration from ticket
For a VLAN aware bridge, if 'bridge-pvid' is not configured,
auto bridge
iface bridge
bridge-ports swp7 swp8
bridge-vids 1-200
bridge-vlan-aware yes
'1' is would be running pvid and [2-200] would be running vids.
While doing _query_check() we compare configred versus running
vids excluding running 'pvid'. Configured vids here is [1-200]
and running is [2-200], but instead of excluding running 'pvid'
we used to exclued configured 'pvid' which is None in this case.
Comparison used to fail because of this.
This patch excludes running 'pvid' instead of configured 'pvid'
during _query_check()
This patch also fixes 'ifquery -c' error for bridge-pvid if
configured under a port of vlan aware bridge
This patch also avoids printing 'bridge-pvid' on 'ifquery -c'
if bridge-pvid is not configured under vlan aware bridge port
sample configuration:
auto swp4
iface swp4
auto swp7
iface swp7
bridge-pvid 2
auto swp8
iface swp8
bridge-pvid 2
auto bridge
iface bridge
bridge-ports swp4 swp7 swp8
bridge-vids 1-200
bridge-pvid 20
bridge-vlan-aware yes
sample output:
root@dell-s3000-02:~# ifquery -c -a
auto swp4
iface swp4 [pass]
bridge-pvid 20 [pass]
auto swp7
iface swp7 [pass]
bridge-pvid 2 [pass]
auto swp8
iface swp8 [pass]
bridge-pvid 2 [pass]
auto bridge
iface bridge [pass]
bridge-vlan-aware yes [pass]
bridge-ports swp8 swp7 swp4 [pass]
bridge-pvid 20
bridge-vids 1-200 []
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
Ticket: CM-11043
Reviewed By: roopa
Testing Done: used the config mentioned in bug
This patch adds a delay before starting IPv6 dhclient to
make sure the configured interface/link in up.
Also, ifdown on a IPv6 interface, this patch makes sure
that the link in up before dhcp release. Dhcp release is
done using a default lease file.
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
Ticket: CM-11811
Reviewed By: roopa, julien
Testing Done: used same configuration from ticket
For a VLAN aware bridge, if 'bridge-pvid' is not configured,
auto bridge
iface bridge
bridge-ports swp7 swp8
bridge-vids 1-200
bridge-vlan-aware yes
'1' is would be running pvid and [2-200] would be running vids.
While doing _query_check() we compare configred versus running
vids excluding running 'pvid'. Configured vids here is [1-200]
and running is [2-200], but instead of excluding running 'pvid'
we used to exclued configured 'pvid' which is None in this case.
Comparison used to fail because of this.
This patch excludes running 'pvid' instead of configured 'pvid'
during _query_check()
This patch also fixes 'ifquery -c' error for bridge-pvid if
configured under a port of vlan aware bridge
sample configuration:
auto swp4
iface swp4
auto swp7
iface swp7
bridge-pvid 2
auto swp8
iface swp8
bridge-pvid 2
auto bridge
iface bridge
bridge-ports swp4 swp7 swp8
bridge-vids 1-200
bridge-pvid 20
bridge-vlan-aware yes
sample output:
root@dell-s3000-02:~# ifquery -c -a
auto swp4
iface swp4 [pass]
bridge-pvid 20 [pass]
auto swp7
iface swp7 [pass]
bridge-pvid 2 [pass]
auto swp8
iface swp8 [pass]
bridge-pvid 2 [pass]
auto bridge
iface bridge [pass]
bridge-vlan-aware yes [pass]
bridge-ports swp8 swp7 swp4 [pass]
bridge-pvid 20
bridge-vids 1-200 []
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
This reverts commit cfc51ed18be9aee902cbc89a57350d9e99a1950d.
this commit seems to have broken usercmds. reverting it until it is
fixed.
Closes: CM-11856
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
commands
Ticket: CM-11274
Testing Done: julien, wkok, nikhil
It uses and goes with the the other batch variables and apis.
This one just calls the 'bridge -batch' command instead
of the 'ip -batch' command.
This can be used to batch bridge commands.
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Ticket: CM-11517
Reviewed By: julien, nikhil, jtoppins
Testing Done: ethtool sanity test
ethtool module should really care only about
physical interfaces. so, this patch makes ethtool
module ignore all logical interfaces, ie interfaces
with link_kind set.
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Ticket: None
Reviewed By: Roopa
Testing Done: with a dummy script I printed the value passed by ifupdown
After the changes I did the same with ifupdown2 and checksd if the values
matched correctly.
This issue was reported on the github repository.
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Ticket: CM-11807
Reviewed By: Roopa, Daniel
Testing Done:
Loading the default template engine (mako) is adding an extra overhead: 100ms
We also import the template engine even if we are dealing with a json input
The overhead is noticable when using NCLU.
With this change we are now important the template engine when a keyword is
found in the configuration file.
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
ifupdown2 can invoke scripts under /etc/network/if-*.d/*
in the required order with the required environment variables.
This patch includes fixes to execute these scripts.
The following attributes in /etc/network/ifupdown2/ifupdown.conf
can influence the execution behaviour of python-addon modules
and /etc/network/if-*.d/*
<ifupdown.conf>
addon_syntax_check=0
addon_scripts_support=1
addon_python_modules_support=1
</ifupdown.conf>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Ticket: CM-11745
Reviewed By: Roopa, Nikhil G
Testing Done: configuration provided in the bug
User was attempting to configure a traditional bridge under a VRF with VRR.
When issuing ifreload -a, the configuration failed to apply with an error.
Applying an address-virtual keyword to an interface with upper interfaces
or parent interfaces was not allowed. But now we are allowing the use of
this keyword only for vrf slaves.
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
and validation
Ticket: CM-8101
Reviewed By: Roopa
Testing Done:
The goal of this commit is to provide the addons a new way to perform their
own specific syntax checks. By implementing `syntax_check` method.
The addons will have to make sure the provided ifaceobj is valid.
e.g. vxlan.py:syntax_check(ifaceobj) should check:
self._is_vxlan_device(ifaceobj)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Ticket: None
Reviewed By: Roopa, Daniel
Testing Done: This is not affecting ifupdown2 yet
the validvals attribute is only used by ifedit
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Ticket: CM-11624
Reviewed By: roopa, julien
Testing Done: using configuration mentioned in the bug
This patch fixes 'ifquery -c' failure for 'bridge-pvid' on
all bridge ports.
The following format of '/sbin/bridge -c vlan show' output was not handled properly
by iproute2
port vlan ids
swp1 600
700-710
711 PVID Egress Untagged
712-900
iproute2 was parsing the '/sbin/bridge -c vlan show' output with the assumption that
pvid line '711 PVID Egress Untagged' appears before all the vland ids.
Something like this:
port vlan ids
swp1 711 PVID Egress Untagged
600
700-710
712-900
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
Ticket: CM-11735
Reviewed By: Roopa, Daniel
Testing Done: creating a vxlan with ifupdown then checking the dstport with
ip -d link show $vlxanName
When creating a vxlan nlmanager didn't re-order/byte swap the dstport value
to little endian
46354 instead of 4789
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Ticket: CM-11718
Reviewed By: CCR-4931
Testing Done: Tested complete regression suite on hardnode in 3.0.
This patch fixes a problem in the ethtool addon module where a single iface stanza was
configured for a link-speed (1G) other then the default (10G). The link-speed config is then
removed or commented out but the link-speed is not restored to its default value (10G) because of
incorrect logic.
Ticket: CM-11195
Reviewed By: roopa, julien
Testing Done: used the configuration mentioned in bug description
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
running values for bridge-portmcrouter, bridge-portmcfl, and bridge-portprios
were accessed using invalid keys.
Ticket: CM-11392
Reviewed By: roopa, dsa, julien
Testing Done: multiple vrf devices on dell-s3000-02
Now that the l3mdev FIB rule is in the CL3.1 kernel tree,
ifupdown2 no longer needs to manage FIB rules for VRF devices.
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
+ adding one byte attribute class for protodown operations.
Ticket: CM-11581
Reviewed By: CCR-4721
Testing Done: Smoke + custom interface file with clag bond that requires protodown.
- nlmanager will now throw an exception if a user is trying to use the default
attribute class when in fact he should use a more specific attribute class.
- The protodown implementation needed to use a one byte attribute to set the protodown state
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Ticket: CM-11511
Reviewed By: CCR-4890
Testing Done: Used "address-virtual" keyword to create VRR interface with IPv6
address. Checked sysctl and dad failures.
In a VRR setup, both switches are programmed with the same IPv6 address and that
address is active on both switches. This causes the IPv6 duplicate address
detection to kick in and diable the use of one of the address on one of the
switches. This patch causes duplicate address detection to be disabled on VRR
interfaces by setting the net.ipv6.conf.<ifname>.accept_dad and
net.ipv6.conf.<ifname>.dad_transmits sysctl's to 0. The only IPv6 addresses
which are defined on these interfaces are the virtual addresses and the link
local address (which is unused). No other operational IPv6 addresses should ever
be assigned to these interfaces. Instead, operational IPv6 addresses should be
assigned to the "base", or lower, interface of the VRR interface.
Ticket: CM-11485
Reviewed By: Roopa
Testing Done: config from the github issue
First reported here https://github.com/CumulusNetworks/ifupdown2/issues/10
ifquery just like ifupdown should try to get the vlan-id from the iface name
if vlan-id attr is not specified.
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Ticket: CM-7360
Reviewed By: CCR-4721
Testing Done: smoke / testifreload / Tested on amd64 platform (by Sam)
For now, we use a mirror copy of nlmanager sources to make sure we don't
depend on it as an external package
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Ticket: CM-11080
Reviewed By: roopa, dsa, dave olson, daniel, julien
Testing Done: yes, with mgmt VRF configured
This patch parses '/usr/bin/pstree -Aps <pid>' output to find
the pid of current ssh session, and send 'sudo ifreload -a'
to background before killing itself.
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>