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

47 Commits

Author SHA1 Message Date
Roopa Prabhu
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
Roopa Prabhu
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
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
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
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
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
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
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
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
ad25e7bb98 Misc fixes. Add a --skip-upperifaces option to ifup (given the confusion
over ifup handling of upperifaces by default) + some fixes in the
reserved vlan check

Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifupdown sanity.
2014-11-25 10:19:35 -08:00
Roopa Prabhu
aa5751ba27 Change "source" inclusion errors to warns.
Ticket: CM-3346
Reviewed By:
Testing Done: tested sanity
2014-11-21 11:07:11 -08:00
Roopa Prabhu
2b5635d457 Fix 'source' file error handling
Ticket:
Reviewed By:
Testing Done:
2014-11-19 17:48:02 -08:00
Roopa Prabhu
16d854b461 Fix a few minor ifquery check failures
Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifupdown2 sanity and query check failures.
2014-11-19 17:25:26 -08:00
Roopa Prabhu
fac4138bfe Change defaults result strings in ifquery check output
Ticket: CM-3810
Reviewed By:
Testing Done: tested ifquery check

defaults from /etc/network/ifupdown2/ifupdown2.conf
ifquery_check_success_str=(OK)
ifquery_check_error_str=(FAIL)
ifquery_check_unknown_str=
2014-11-15 23:34:02 -08:00
Roopa Prabhu
d8e3554dde minor fixes for ifquery and stp handling
Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifupdown2 sanity
2014-11-15 15:42:52 -08:00
Roopa Prabhu
97382e8841 Fix auto flag handling during reload
Ticket: CM-4204
Reviewed By:
Testing Done: Tested ifreload with interfaces file in the bug

My last checkin moved the auto flag around causing the breakage
2014-11-12 22:43:24 -08:00
Roopa Prabhu
2da58137d8 Misc fixes + ifreload new option + cleanups + more ifquery support etc
Ticket: CM-3346, CM-3784, CM-3841
Reviewed By:
Testing Done: various ifupdown2 tests
2014-11-11 21:58:12 -08:00
Roopa Prabhu
8e113d6319 misc query and fdb/vlan add fixes
Ticket: CM-3346
Reviewed By:
Testing Done: ifupdown2 sanity
2014-11-03 17:55:51 -08:00
Roopa Prabhu
9e012f9e8a some more ifquery support (for vxlan devices etc)
Ticket: CM-3784
Reviewed By:
Testing Done: Tested ifquery check/running and sanity
2014-10-31 11:28:07 -07:00
Roopa Prabhu
cb46a2082f misc bug fixes for svi address propagation, svi query etc
Ticket: CM-3346
Reviewed By:
Testing Done: Tested new format with new bridge driver

- add/del vlan aware bridge svi mac addresses from bridge
- shorten macvlan interface names to <bridge>-<vid>-v<n>
- fix query check for address-virtual interfaces
- fix query check for vlan interfaces
2014-10-28 23:04:40 -07:00
Roopa Prabhu
e160136944 Bug fixes and some query support
Ticket: CM-3346
Reviewed By:
Testing Done: sanity testing and syntax testing for new bridge driver
2014-10-28 16:10:00 -07:00
Roopa Prabhu
84ca006f82 First phase checkin for new format for vlan aware bridge
Ticket: CM-3346
Reviewed By:
Testing Done: Sanity test + test new bridge format

There are a bunch of open issues with `vlan` interface handling.
Below is the format.

auto swp1
iface swp1
    bridge-access 300
    mstpctl-pathcost 0
    mstpctl-adminedge yes
    mstpctl-autoedge yes
    mstpctl-p2p yes
    mstpctl-bpduguard yes
    mstpctl-treeprio 64
    mstpctl-network yes
    mstpctl-bpdufilter yes

auto swp2
iface swp2
    bridge-vids 301
    bridge-pvid 302
    bridge-pathcost 10
    bridge-priority 10
    bridge-multicast-router 0
    bridge-multicast-fast-leave 1

auto br0
iface br0
    bridge-vlan-aware yes
    bridge-stp on
    bridge-ports swp1 swp2
    bridge-vids 2001

auto br0.2001
iface br0.2001
    address 10.0.14.2
    hwaddress 00:03:00:00:00:12
    address-virtual 00:00:5e:00:01:01 11.0.4.1/24

auto br0.2001
vlan br0.2001
    bridge-igmp-querier-src 172.16.101.1
2014-10-24 10:11:07 -07:00
Roopa Prabhu
c2d55ff5f2 Fix bridge deletion
Ticket: CM-3346
Reviewed By:
Testing Done: Tested bridge up/down
2014-10-13 10:07:36 -07:00
Roopa Prabhu
e74d01e1b2 Add rtnetlink api's for link creates
Ticket: CM-3346
Reviewed By:
Testing Done:
2014-10-12 13:50:05 -07:00
Roopa Prabhu
e57b12e75a Replace check mark by none and cross mark by ascii 'x' in --check output
Ticket: CM-3810
Reviewed By:
Testing Done:

These are configurable via strings check_success_str and check_error_str
in /etc/network/ifupdown2/ifupdown2.conf
2014-10-10 14:52:11 -07:00
Roopa Prabhu
8c13865cd4 Fix a few ordering issues + fix following upperiface for bridge device
Ticket: CM-3346
Reviewed By:
Testing Done: sanity test
2014-10-10 14:05:19 -07:00
Roopa Prabhu
39804250c7 A few more fixes to the vlan aware bridge case
Ticket: CM-3346
Reviewed By:
Testing Done: Tested with new and old bridge formats
2014-10-09 19:10:20 -07:00
Roopa Prabhu
679e656768 more support and fixes to support new format for vlan filtering bridge
Ticket: CM-3346
Reviewed By:
Testing Done: Tested with old and new formats

Details of the format are attached to the bug.
2014-10-09 12:58:16 -07:00
Roopa Prabhu
41febf8975 support for new bridge driver syntax
Ticket: CM-3346
Reviewed By:
Testing Done: tested vmware interfaces file with old and new formats

details:
- move bridge port membership to under the port
- move bridge port attributes under ports
- bridge attributes continue to remain under bridge
- special vlan interface for vlan attributes and svi config (iface
vlan-<vlanid/range>)
- maintain backward compatibility with all previously released bridge
config formats for vlan aware bridge

Open issues:
- check and running support will be done part of CM-3784
- ifquery currently expands and prints all the vlan-* interfaces.
2014-10-06 11:11:10 -07:00
Roopa Prabhu
ee3fcf4431 Minor fixes for multiple interfaces with the same config + performance
fix for the dependency graph generator code

Ticket:
Reviewed By:
Testing Done: sanity test
2014-09-26 14:23:15 -07:00
Roopa Prabhu
904908bc5f Documentation cleanup
Ticket:
Reviewed By:
Testing Done:

- these changes are mainly related to api doc generation using sphinx
2014-07-22 11:15:56 -07:00