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

269 Commits

Author SHA1 Message Date
Roopa Prabhu
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
anuradhak
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
anuradhak
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
anuradhak
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
anuradhak
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
Roopa Prabhu
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
Roopa Prabhu
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
Roopa Prabhu
1f87118e33 Fix error msg strings from rtnetlink module
Ticket:
Reviewed By:
Testing Done:
2014-12-26 09:56:49 -08:00
Roopa Prabhu
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
Roopa Prabhu
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
Roopa Prabhu
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
John Berezovik
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
Roopa Prabhu
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
Roopa Prabhu
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
Roopa Prabhu
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
Roopa Prabhu
ff3bdefff7 bring up bridge ports only after vlan config is done
Ticket:
Reviewed By: wkok
Testing Done: unit testing + testing by wkok/purna
(cherry picked from commit 5af90b2893cd54bb21fedaf27ec6dd22de3f2802)

Conflicts:
	packages/ifupdown2/addons/bridge.py
2014-12-14 12:44:53 -08:00
Roopa Prabhu
75cf99baa1 bring up bridge ports only after vlan config is done
Ticket:
Reviewed By: wkok
Testing Done: unit testing + testing by wkok/purna
2014-12-12 23:45:31 -08:00
Roopa Prabhu
1be3f95b01 s/fallback/bypass/
Ticket: CM-4452
Reviewed By:
Testing Done: Tested with old and new format
2014-12-12 23:14:54 -08:00
Roopa Prabhu
2261e862c2 s/fallback/bypass/
Ticket: CM-4452
Reviewed By:
Testing Done: Tested with old and new format
2014-12-12 22:56:29 -08:00
Roopa Prabhu
a193f425f5 Make bridge module the owner of bridge port links (This is to delay
bridge port up until bridge is up)

Ticket:
Reviewed By:
Testing Done:
2014-12-11 19:06:21 -08:00
Roopa Prabhu
73c275920a Fix hex flags representation (this was causing wrong evaluation of & and
| on flags)

Ticket:
Reviewed By:
Testing Done:

Problem seen with ifquery skipping some interfaces because of wrong
evaluation of iface flags
2014-12-11 16:13:25 -08:00
Roopa Prabhu
40ed8c4d30 Add a few more trt/except blocks to warn and proceed
Ticket:
Reviewed By:
Testing Done:

<DETAILED DESCRIPTION (REPLACE)>
(cherry picked from commit da446f09f0c723852f20ba1c666abcc80b5fe764)
2014-12-10 22:07:40 -08:00
Roopa Prabhu
3980661f16 Add a few more trt/except blocks to warn and proceed
Ticket:
Reviewed By:
Testing Done:

<DETAILED DESCRIPTION (REPLACE)>
2014-12-10 21:30:39 -08:00
Roopa Prabhu
853d3b146a Remove stale debug
Ticket:
Reviewed By:
Testing Done:
(cherry picked from commit 3ccb3873a995ee7d47134dbbae88ebb424da6d8e)
2014-12-09 14:27:44 -08:00
Roopa Prabhu
724a5011b9 Remove stale debug
Ticket:
Reviewed By:
Testing Done:
2014-12-09 14:26:11 -08:00
Roopa Prabhu
6c3425307c Add clagd in the default shipped addons.conf and remove the editing of
addons file

Ticket: CM-4423
Reviewed By:
Testing Done: tested ifupdown2 in the presence and absence of clagd

This is a hack to get around an ifupdown2 limitation.
The real fix should come as part of CM-3782
(cherry picked from commit 6fb63d6cdcb660063cf5d07ff28f49c34a306371)
2014-12-09 14:24:06 -08:00
Roopa Prabhu
5be7399dc9 Fix if condition when propagating link_type (old flags check left over from my previous
commit)

Ticket: CM-4408
Reviewed By:
Testing Done: Tested with old bridge driver config (bug reported by
satish)
(cherry picked from commit 11e6ae96aae85591e8d32e1062d979e51de9e424)
2014-12-09 14:24:06 -08:00
Roopa Prabhu
c416da6adc Move LINK_MASTER/LINK_SLAVE to a new field link_type (purna hit some
issues with having it in flags) + add check for bond slave being already up

Ticket: CM-4408
Reviewed By:
Testing Done: some bond sanity test
(cherry picked from commit 346b62a41fbf4521008cd8a9b0fa227e75a5d994)
2014-12-09 14:24:05 -08:00
Roopa Prabhu
b48ff1a983 This patch moves bond slave link ownership to the bond module and makes
sure that slaves can never be brought admin up on their own when they
are not in the bond

Ticket: CM-4408
Reviewed By: CCR-2323
Testing Done: Tested ifup/ifdown of bond slaves and bond interface

This patch introduces:
- introduces 2 interface flags, LINK_MASTER and LINK_SLAVE.
- The bond module will set LINK_MASTER on the bond iface object
indicating that the bond module owns the link.
- Which means that all lower devices /slaves of the bond get their
link when the bond (aka LINK_MASTER) is processed in the bond module
- The module that queries dependencies propagates the LINK_SLAVE flags
on the dependents of LINK_MASTER.
- The scheduler now acts on the LINK_SLAVE flag. If LINK_SLAVE is set,
it skips setting admin 'up' on that interface. It also makes sure the
interface is not already in the bond.
    ie if an interface is a LINK_SLAVE (bond slave in this case), admin
up will not be executed when the interface is not inside the bond.
(cherry picked from commit 84b5a07a4f7685c7ae2eac5892889d6c0e08b2eb)
2014-12-09 14:24:05 -08:00
Roopa Prabhu
f4dbd14226 Add clagd in the default shipped addons.conf and remove the editing of
addons file

Ticket: CM-4423
Reviewed By:
Testing Done: tested ifupdown2 in the presence and absence of clagd

This is a hack to get around an ifupdown2 limitation.
The real fix should come as part of CM-3782
2014-12-09 13:49:23 -08:00
Roopa Prabhu
33a2e9e9bf Fix if condition when propagating link_type (old flags check left over from my previous
commit)

Ticket: CM-4408
Reviewed By:
Testing Done: Tested with old bridge driver config (bug reported by
satish)
2014-12-09 12:56:45 -08:00
Roopa Prabhu
c9bba7539d Move LINK_MASTER/LINK_SLAVE to a new field link_type (purna hit some
issues with having it in flags) + add check for bond slave being already up

Ticket: CM-4408
Reviewed By:
Testing Done: some bond sanity test
2014-12-08 22:59:41 -08:00
Roopa Prabhu
7f045fd868 This patch moves bond slave link ownership to the bond module and makes
sure that slaves can never be brought admin up on their own when they
are not in the bond

Ticket: CM-4408
Reviewed By: CCR-2323
Testing Done: Tested ifup/ifdown of bond slaves and bond interface

This patch introduces:
- introduces 2 interface flags, LINK_MASTER and LINK_SLAVE.
- The bond module will set LINK_MASTER on the bond iface object
indicating that the bond module owns the link.
- Which means that all lower devices /slaves of the bond get their
link when the bond (aka LINK_MASTER) is processed in the bond module
- The module that queries dependencies propagates the LINK_SLAVE flags
on the dependents of LINK_MASTER.
- The scheduler now acts on the LINK_SLAVE flag. If LINK_SLAVE is set,
it skips setting admin 'up' on that interface. It also makes sure the
interface is not already in the bond.
    ie if an interface is a LINK_SLAVE (bond slave in this case), admin
up will not be executed when the interface is not inside the bond.
2014-12-08 17:15:57 -08:00
Roopa Prabhu
9562b117e4 Disable loopback module until we decide and document it
Ticket: CM-3525
Reviewed By:
Testing Done:
2014-12-04 08:24:22 -08:00
Roopa Prabhu
a594e025f5 Disable vrrpd until it is fully supported
Ticket: CM-3791
Reviewed By:
Testing Done: compile tested
(cherry picked from commit 382c2a165d9927ff26f22ce2a2a57c3742fbbfa5)
2014-12-04 08:23:44 -08:00
Roopa Prabhu
971c9b35c0 Disable vrrpd until it is fully supported
Ticket: CM-3791
Reviewed By:
Testing Done: compile tested
2014-12-04 08:09:05 -08:00
Roopa Prabhu
f59b5c656b Fix reserved vlan check + change switchd ifupdown reserved vlan script
to return reserved vlan range from /etc/cumulus/switchd.conf

Ticket: CM-4367
Reviewed By: wkok
Testing Done: Tested using reserved vlans in old and new bridge
(cherry picked from commit 8626feb08703392b29e234b2f81f4df536ad7f7b)
2014-12-03 14:06:57 -08:00
Roopa Prabhu
2708f9155f Fix reserved vlan check + change switchd ifupdown reserved vlan script
to return reserved vlan range from /etc/cumulus/switchd.conf

Ticket: CM-4367
Reviewed By: wkok
Testing Done: Tested using reserved vlans in old and new bridge
2014-12-03 14:03:34 -08:00
Andy Gospodarek
43876f38b6 ifupdown2: remove up op in config file
Ticket: CM-3525
Reviewed By: CCR-2035
Testing Done: ifup/ifdown, service networking restart, reboot

Need for this change noticed in review.
(cherry picked from commit 231e2cf74b0f55b65f76d315d04f3a9c8279f51b)
2014-12-02 19:59:06 -08:00
Andy Gospodarek
4b08367ba3 ifupdown2: remove up op in config file
Ticket: CM-3525
Reviewed By: CCR-2035
Testing Done: ifup/ifdown, service networking restart, reboot

Need for this change noticed in review.
2014-12-02 19:55:30 -08:00
Roopa Prabhu
5b4d304406 Fix formatting for ifquery check (cosmetic. only fixes prints)
Ticket: CM-3346
Reviewed By:
Testing Done: ifupdown2 sanity + ifquery check tests
(cherry picked from commit ba81bde56d04a8f90a6f5d548518605fd1e5ae5f)
2014-12-01 23:24:08 -08:00
Roopa Prabhu
0212f53ccb Fix formatting for ifquery check (cosmetic. only fixes prints)
Ticket: CM-3346
Reviewed By:
Testing Done: ifupdown2 sanity + ifquery check tests
2014-12-01 23:19:48 -08:00
Roopa Prabhu
cf5dcafa07 continue passing the object to other modules if one of the modules fails
Ticket: CM-4336
Reviewed By:
Testing Done: Tested with the missing port testcase from CM-4336
(cherry picked from commit 82a976ada6ba208bde089805d613413a5b016f8d)
2014-12-01 15:15:19 -08:00
Roopa Prabhu
3e6ea735cc continue passing the object to other modules if one of the modules fails
Ticket: CM-4336
Reviewed By:
Testing Done: Tested with the missing port testcase from CM-4336
2014-12-01 14:54:12 -08:00
Roopa Prabhu
ef892cccd9 Check for unexpected characters (specifically the ones which look like
variable names) + also fix a condition that looks incorrect

Ticket:
Reviewed By: wkok
Testing Done: Tested with the failing

This was seen in a case where mako is unable to render the template
or incorrectly renders it due to user template
errors, leaving interface names with
mako variables in them. There is no easy way to
recognize and warn about these. This patch tries to warn the user
of such cases by looking for variable patterns ('$') in interface names.
(cherry picked from commit fc0d45a794a61f7e6a3fd2c2ebce3d621bf0c7b2)
2014-11-30 21:48:56 -08:00
Roopa Prabhu
41d1ada659 Check for unexpected characters (specifically the ones which look like
variable names) + also fix a condition that looks incorrect

Ticket:
Reviewed By: wkok
Testing Done: Tested with the failing

This was seen in a case where mako is unable to render the template
or incorrectly renders it due to user template
errors, leaving interface names with
mako variables in them. There is no easy way to
recognize and warn about these. This patch tries to warn the user
of such cases by looking for variable patterns ('$') in interface names.
2014-11-30 21:44:46 -08:00
Roopa Prabhu
a3c7ba7a09 Change to square brackets (hopefully last change on this before it goes
out)

Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifquery check
(cherry picked from commit d8b03e1d50e2936d87a419f16564b79b908e6ef7)
2014-11-30 21:22:10 -08:00
Roopa Prabhu
1cb7f1c087 Change to square brackets (hopefully last change on this before it goes
out)

Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifquery check
2014-11-30 21:15:10 -08:00
Roopa Prabhu
cd3059b82b Change case of check strings
Ticket: CM-3346
Reviewed By: cosmetic
Testing Done: ifquery check sanity
(cherry picked from commit 556a078a7f551f1f895f0ddc71b6124d960ffb4e)
2014-11-28 12:54:04 -08:00
Roopa Prabhu
a3b9ac1e99 Change case of check strings
Ticket: CM-3346
Reviewed By: cosmetic
Testing Done: ifquery check sanity
2014-11-28 12:48:01 -08:00