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

654 Commits

Author SHA1 Message Date
44533c7298 Modified ifupdown support for vxlan head end replication
Ticket: CM-5637
Reviewed By: CCR-2755
Testing Done:

Replaced vxlan-peernodeip attribute with vxlan-remoteip.  Updated
the vxlan and iproute2 modules to configure head end replication
using bridge fdb commands.
2015-04-15 10:15:22 -07:00
1cda1e437b rework error message
Ticket: CM-5373
Reviewed By:
Testing Done: tested interfaces file with shared dependents
2015-04-03 22:33:53 -07:00
45ca0b6d42 Add check for shared dependents during building dependency list
Ticket: CM-5373
Reviewed By: sam
Testing Done: Tested with shared slaves in bridge and bonds
2015-04-03 22:18:32 -07:00
a4912b996e Dont follow dependents during down of interfaces as part of ifreload
Ticket: CM-5571
Reviewed By:
Testing Done: tested ifreload with example in the bug

ifdown of the bridge svi was following the lowerdev and downing the
bridge. kernel implicitly deletes all svi's on bridge down.
ifup of the bridge usually handles it, but a change done in 2.5.1
was causing it not to. Thinking about this some more, its safe
to not follow dependents on down during a ifreload. This patch does
just that.
2015-04-03 20:47:06 -07:00
acf9264497 Add config len check to iface compare
Ticket: CM-5253
Reviewed By: sam
Testing Done: Tested ifreload with steps in the bug
2015-04-03 20:33:28 -07:00
1321132890 Prevent MTU from being set to 1500 on interface downing.
Ticket: CM-5355
Reviewed By: roopa
Testing Done: Tested config in ticket

MTU settings are defaulted 1500 when interface is ifdowned.
This has the effect of changing the MTU on the interface and any subinterfaces to
1500.  And if these subinterfaces are in a bridge, the bridge will pick the MIN MTU
so the bridge keeps this MTU even after the interface is brought back up. The sub
interface does not change to a higher value then 1500 (kernel VLAN driver only
moves the MTU is the decreasing direction.
2015-03-17 21:59:15 -04:00
d9357cd07c Merge branch 'CumulusLinux-2.5_br' of ssh://dev.cumulusnetworks.com/home/trac/cumulus into CumulusLinux-2.5_br 2015-03-10 14:19:41 -07:00
0edaee373f merge docs.addons content into docs directory
Ticket:
Reviewed By:
Testing Done:
2015-03-10 14:18:30 -07:00
fa714fa248 Correct error message for unsupported ifupdown2 attributes
Ticket: CM-5349
Reviewed By: Trivial
Testing Done: Tested on cel box

Corrected a minor error in how we handle unsupported config attributes.
Instead of

     error: not enough arguments for format string

we will now print this:

     warning: peerlink.4000: unsupported attribute 'clagd-foobar'
(cherry picked from commit 44c6004a33d59ee234f8ee3d5f450e158c9e5bdc)
2015-03-10 16:54:41 -04:00
c65c2ccde1 Wrong initialization of iface link kind (still puzzled how i had it this
way)

Ticket:
Reviewed By: trivial
Testing Done: Tested interface upperiface bring up

This was causing the auto upperiface bringup to pick all upperifaces on
malliks setup. This is a large number in a 500 svi setup.
2015-02-26 14:26:58 -08:00
f28e72e544 move link_set 'up' errors to debug
Ticket: CM-5199
Reviewed By: trivial
Testing Done: tested with interfaces file in the bug
2015-02-25 13:45:37 -08:00
ba1b38298b Increase LACP bypass period max to 900 seconds
Ticket: CM-5000
Reviewed By: Roopa
Testing Done:
2015-02-24 09:44:20 -08:00
3fc16f816d Merge branch 'CumulusLinux-2.5_br' of ssh://dev.cumulusnetworks.com/home/trac/cumulus into CumulusLinux-2.5_br 2015-02-18 12:32:05 -08:00
5b65654f85 Call mako renderer before rendering backslashes ('\')
Ticket: CM-5104
Reviewed By:
Testing Done: Tested with interfaces file listed in the bug
2015-02-18 12:28:50 -08:00
fa6a36a90d Replace bond-slave "link down" with "link protodown" for CLAG bond proto_down
handling.

Ticket: CM-4802
Reviewed By: CCR-2565
Testing Done: Yes

1. Earlier various clag components where using link admin state for enforcing
proto_down. With the introduction of a seperate proto_down state this is no
longer needed. Now on clag bond "proto_down" the bond and its slaves are
explicitly placed in a proto_down state. This carrier downs the slaves and
oper-downs the clag-bond. Change has been done in clagd, clag-monit script and
bonding driver.
2. Earlier misc tricks where needed in ifupdown2 to prevent slave state changes
for clag bond outside of clagd. These tricks are no longer needed and have been
reverted to keep ifupdown2 handling simple/consistent. This change basically
reverts #6985e1a376b538fbfa2346ef657427ae7e8f117a.
2015-02-18 08:44:37 -08:00
b6c1f5513a ifupdown2 must handle JSON input that is non-list
Ticket: CM-4417
Reviewed By: roopa
Testing Done: Build powerpc image and tested alternate json format

ifupdown2 was patched to handle nonlist JSON input since this
is a valid format.
(cherry picked from commit 2597194f6f34344495f3a2b44bfe1d05887e1e77)
2015-02-11 11:41:16 -05:00
496745cdc0 Add checks for BRIDGE_VLAN interfaces during link up/down
Ticket: CM-4718
Reviewed By:
Testing Done: tested ifup/ifdown of vlan interfaces
2015-02-10 11:28:53 -08:00
5828d8c5f9 Check for zero address on bridge ports before enslaving it to the bridge
Ticket: CM-4859, CM-4382
Reviewed By:
Testing Done: Tested with config which included bond bridge ports with
zero address on the bond.

The bridge driver rejects the port add with -EINVAL.
A bond with no slaves is one usecase where the bond interface
has a zero hw address and is rejected by the bridge.
EINVAL currently is very confusing.

This patch checks for a valid ether add before enslaving the port to the
bridge.
2015-02-10 11:17:00 -08:00
49e5c096bd Add dependency on python-argcomplete, python-ipaddr and python-gvgen
Ticket: CM-4453
Reviewed By:
Testing Done: Build tested
(cherry picked from commit ee9aa1a1bf510f950030f72cbc12ed41b0bc880d)
2015-02-09 17:27:35 -08:00
ff01349dd4 Move clag_enable setting to ifupdown2 ifenslave.
Ticket: CM-4802
Reviewed By:
Testing Done: yes

1. clag_enable needs to be set before slaves are added to the bond. Otherwise
bonding driver will bring the slaves up independent of clagd.
2. also added post_down clagd addon to cleanup the clag-id on ifdown.
2015-02-02 12:53:14 -08:00
67b8126335 [Change by Roopa] To prevent ifupdown2 setting clag-bond slave states on ifup.
Ticket: CM-4802
Reviewed By: CCR-2507
Testing Done: Yes

1. For clag bonds the slaves are kept down under various conditions (when clagd
is holding the bond in an errDisabled state). ifupdown2 should not set the slave
states for clag bonds.
2. Bonding driver sets the slave states on enslave and release (also for
non-clag bonds) so ifupdown2 doesn't need to set the slave state.
2015-02-02 12:53:14 -08:00
64db332a85 s/portautoedge/portadminedge/ + configure BA on uplink port
Ticket:
Reviewed By:
Testing Done:
2015-01-28 17:06:51 -08:00
7bbc934097 Handle blank lines correctly in addons.conf
Ticket: (Reported by gospo)
Reviewed By:
Testing Done: Tested with blank lines in the file
2015-01-22 12:56:56 -08:00
a53e80bca9 Fix typo in comment in default config file
Ticket:
Reviewed By: trivial
Testing Done: no code change
2015-01-16 09:54:19 -08:00
c4842479ad Added clag-id to the interfaces example file.
Ticket:
Reviewed By:
Testing Done:
2015-01-12 13:52:33 -08:00
a57fc3a0bb change ifupdown example for vxlan-learning to the non-default option
Ticket: CM-4723
Reviewed By: CCR-2408
Testing Done:

Change example to non-default option - "vxlan-learning off"
2015-01-06 22:12:08 -08:00
fce93c54de Fix BCM SDK tunnel termination object cleanup on vxlan tunnel delete
Ticket: CM-4723
Reviewed By: CCR-2408
Testing Done: vxlan_fld_test.py:test_bond_vxlinux_convergence_flaps, manual testing

On tunnel delete, tunnel termination object in BCM sdk is not cleaned properly.
As a result, mpls_entry in the hardware is left around even though software has
deleted the tunnel. This prevents subsequent dynamic creation of the same tunnel
and also mac learning, as mpls_entry points to invalid SVP with no CML setting
to do hardware learning.

Also, changes in ifupdown2 to make "vxlan-learning on" as default, so that
user/script doesn't have to explicitly turn on the learning.
2015-01-06 21:16:39 -08:00
404cc695a5 Move disable ipv6 error to info in mstpctl module (test scripts are
still using mstpctl-ports)

Ticket: CM-4622
Reviewed By:
Testing Done: Tested bridge sanity
2015-01-03 22:35:45 -08:00
d462f1fa2d Document ifreload new option + add it into init.d networking script
Ticket:
Reviewed By: trivial
Testing Done: Tested build/install/boot + ifupdown2 sanity
2015-01-03 00:27:35 -08:00
782fa53938 Warn when bond-min-links is absent or set to '0'
Ticket: CM-4327
Reviewed By:
Testing Done: Tested bond config without the bond-min-links attribute
2015-01-02 18:20:15 -08:00
0ba357128e Always set lacp-bypass-allow value to default if lacp-bypass-allow is
not given by the user

Ticket: CM-4552
Reviewed By:
Testing Done: Tested with and without lacp-bypass-allow in the file
2015-01-01 20:43:10 -08:00
a8f0880820 Moved warning to info level
Ticket: CM-4622
Reviewed By:
Testing Done: Tested ifup/ifdown on a bridge

If the file is not present, we will just log it.
2014-12-31 23:47:18 -08:00
00f6105d9f Add hack to flap macvlan dev if it already exists and if the route to the vrr network is pointing to it (part of commit 1ef86ab1930d198b0fba7ac33576c22f34d89f14)
Ticket: CM-4639
Reviewed By:
Testing Done: Tested with interfaces file and steps from the bug

This is a Hack to make sure the primary address
is the first in the routing table. Its not a full proof solution.

We use `ip route get` on the vrr network to see which
device the kernel returns. if it is the mac vlan device,
flap the macvlan device to adjust the routing table entry.
flapping the macvlan device makes sure the macvlan
connected route goes through delete + add, hence adjusting
the order in the routing table.
2014-12-31 23:43:27 -08:00
f8858144ef Add hack to flap macvlan dev if it already exists and if the route to
the vrr network is pointing to it

Ticket: CM-4639
Reviewed By:
Testing Done: Tested with interfaces file and steps from the bug

This is a Hack to make sure the primary address
is the first in the routing table. Its not a full proof solution.

We use `ip route get` on the vrr network to see which
device the kernel returns. if it is the mac vlan device,
flap the macvlan device to adjust the routing table entry.
flapping the macvlan device makes sure the macvlan
connected route goes through delete + add, hence adjusting
the order in the routing table.
2014-12-31 22:51:46 -08:00
f3b69969e3 Fix link_type flag for objects read from state file + fix link_type
initializations in a few other places

Ticket: CM-4610
Reviewed By:
Testing Done: Tested with the failing sequence of events described in
the bug
2014-12-31 14:10:45 -08:00
cebe79c93a Move link_master_slave flag overrides to /sbin/ifupdown + log a msg to
indicate link_master_slave flag status

Ticket:
Reviewed By:
Testing Done: ifupdown2 sanity tests with link_master_slave feature on/off
2014-12-29 22:10:36 -08:00
fff589ea4c Moved bond-clag-id attr setting from ifenslave.py to addons/clagd.py
Ticket:
Reviewed By:
Testing Done:

<DETAILED DESCRIPTION (REPLACE)>
(cherry picked from commit ed008ea9ec176e01b2043b872ad0b8b193f31d0f)
2014-12-29 12:33:30 -08:00
de1ee6b022 Changes to replace clagid setting in the bonding driver with -
1. clag_enable flag in the bonding driver
2. And clagid in clagd

Ticket: CM-4091
Reviewed By:
Testing Done: yes

1. Two new commands have been introduced in clagctl - setclagid and showclagid.
These commands will be used by ifupdown2 to set and read/check the clagid.
2. In addition a bit will be maintained per-bond in the bonding driver to
indicate if a bond is a CLAG bond.
(cherry picked from commit cb160bad45d330fe5f544d0d9a40c1c77b9b563f)
2014-12-29 12:33:14 -08:00
1acbac9208 Updated in response to review comments in CCR-2301
Ticket:
Reviewed By:
Testing Done:

<DETAILED DESCRIPTION (REPLACE)>
(cherry picked from commit 48276ee247e230fdd9cd89a33e3b21f13fe85e58)
2014-12-29 12:33:06 -08:00
2b87f9574f CLAG id for 2.5.0
Ticket:
Reviewed By:
Testing Done: Yes

1. ifupdown2/bonding-driver changes to show/store clag-id (errDisabled/dormant states for bond slaves will follow in 2.5.1)
2. clagd changes for
   a. --forceDynamic - clagid is ignored in this mode
   b. (default) static mode - clagid is matched along with partner mac for dualConnection; also ad_sys_mac is only changed for clag bonds (bonds with a non-zero clag-id).

Conflicts:
	patches/kernel/series
2014-12-29 12:32:57 -08:00
f6a0fa151b Added a few more try-except clauses during bridge config to continue on
failures

Ticket: CM-4382
Reviewed By:
Testing Done: Tested with bridge port addition failure example in the
bug report
2014-12-27 20:39:17 -08:00
61c4d72447 Suppress 'Network down' warnings when link_master_slave feature is on
Ticket: CM-4462
Reviewed By:
Testing Done: Tested with interfaces file given in the bug.

The 'network down' msg from the kernel is when the lower device is not
'admin up'. In CM-4462 it is seen when the vlan interface on the bond
is 'admin up' when the bond is still in 'admin down' state.
The bond is also a bridge port so, bond will be 'admin up' when
the bridge it belongs to is brought up.

As link_master_slave feature is on only when all network interfaces
are brought up/down, the states of all interfaces will eventually
converge to 'admin up', so ignoring such transient 'network down' messages.
2014-12-26 09:57:08 -08:00
1f87118e33 Fix error msg strings from rtnetlink module
Ticket:
Reviewed By:
Testing Done:
2014-12-26 09:56:49 -08:00
7e2e64fbe9 Fix a bug with disabling of config option link_master_slave + turn off
link master slave feature when '-a' is not specified.

Ticket: CM-4408
Reviewed By:
Testing Done: Tested with ifupdown2.conf link_master_slave on/off

This will make the behaviour change mostly invisible to users

Conflicts:
	packages/ifupdown2/ifupdown/ifupdownmain.py
2014-12-26 09:56:39 -08:00
d52f59043c Add rtnetlink api's for 'bridge vlan' and modify 'bridge vlan' commands
in vlan module to use rtnetlink api

Ticket: CM-4173
Reviewed By:
Testing Done: Tested new bridge driver svi up/down

This does not move all 'bridge vlan' commands to rtnetlink yet.
2014-12-26 09:54:00 -08:00
a9ab1b4f10 Rework bridge upperiface handling (to fix some problems with the new
bridge driver and svi config)

Ticket: CM-3346
Reviewed By:
Testing Done: Tested upper interface handling during ifup of
bonds/bridges/svis
2014-12-26 09:53:51 -08:00
97f4cff80c Merge branch 'release-2.5' into CumulusLinux-2.5_br
Conflicts:
	build-config/make/local-pkgs.make
	packages/cafe/clobjects.py
	packages/cafe/clobjects_l3_quagga.py
	packages/cl-basefiles/etc/cumulus/datapath/traffic.conf
	packages/cl-utilities/etc/monit/monitrc.d/cumulus
	packages/clag/ifupdown/clagd.py
	packages/ifupdown2/addons/bridge.py
	packages/ifupdown2/addons/ifenslave.py
	packages/ifupdown2/ifupdown/iface.py
	packages/ifupdown2/ifupdown/ifupdownmain.py
	packages/ifupdown2/ifupdown/scheduler.py
	packages/portwd/portwd
	patches/bcm-sdk/series
	patches/iproute/bridge-increase-netlink-rcv-buf-size.patch
	patches/iproute/series
	patches/kernel/driver-support-sff-8436-eeprom.patch
	patches/kernel/network-bridge-dont-install-local-mac.patch
	patches/kernel/series
	patches/lldpd/series
	patches/mstpd/clag_port_fsm_reset.patch
	patches/mstpd/mstpd_init_system.patch
	patches/mstpd/series
	patches/quagga/series
	rootconf/default/etc/default/cron
	switchd/hal.c
	switchd/hal_bcm.c
	switchd/hal_bcm_config.c
	switchd/hal_bcm_config.h
	switchd/hal_config.c
	switchd/hal_config.h
	switchd/hal_int.h
	switchd/sync.c
	tests/tests/l3/bgp_alpm_test.py
	tests/tests/l3/bgp_path_hunting.py
	tests/tests/l3/bgp_smoke_test.py
	tests/tests/l3/l3_node.py
	tests/tests/l3/mc_snoop_test.py
	tests/tests/lib/decorators.py
	tests/tests/smoke/testifupdown2.py
	utilities/ci/pretest.yml
	utilities/distro-cmd
	utilities/packages/ssim2/setup.py
	utilities/packages/ssim2/ssim2/simlib.py
2014-12-24 12:20:53 -08:00
8c2c9f2661 Add check for vlan aware bridge when setting arp_accept to 1
Ticket: CM-4373
Reviewed By:
Testing Done: Tested with address on vlan aware bridge as described in
the bug
2014-12-17 15:09:52 -08:00
a070c90ec3 Multiple fixes and cleanup
Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifupdown2 sanity

- moved 'admin up' delays that we introduced recently to be
configurable via two ifupdown2.conf attributes
    # Let link master (bridges, bonds) own the link state of slaves
    link_master_slave=1

    # Delay admin state change till the end
    delay_admin_state_change=0

- reduced some redundant traversal of dependency trees

- fixed a few bugs in query check
2014-12-17 12:39:38 -08:00
caac3e369d fix kernel lacp_fallback_* sysfs file references to use lacp_bypass_*
Ticket:
Reviewed By:
Testing Done: Build and sanity test
2014-12-16 00:18:50 -08:00