]> git.proxmox.com Git - mirror_ifupdown2.git/log
mirror_ifupdown2.git
9 years agoMove LINK_MASTER/LINK_SLAVE to a new field link_type (purna hit some
Roopa Prabhu [Tue, 9 Dec 2014 06:59:41 +0000 (22:59 -0800)]
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

9 years agoThis patch moves bond slave link ownership to the bond module and makes
Roopa Prabhu [Tue, 9 Dec 2014 01:15:57 +0000 (17:15 -0800)]
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.

9 years agoDisable loopback module until we decide and document it
Roopa Prabhu [Thu, 4 Dec 2014 16:24:22 +0000 (08:24 -0800)]
Disable loopback module until we decide and document it

Ticket: CM-3525
Reviewed By:
Testing Done:

9 years agoDisable vrrpd until it is fully supported
Roopa Prabhu [Thu, 4 Dec 2014 16:09:05 +0000 (08:09 -0800)]
Disable vrrpd until it is fully supported

Ticket: CM-3791
Reviewed By:
Testing Done: compile tested
(cherry picked from commit 382c2a165d9927ff26f22ce2a2a57c3742fbbfa5)

9 years agoFix reserved vlan check + change switchd ifupdown reserved vlan script
Roopa Prabhu [Wed, 3 Dec 2014 22:03:34 +0000 (14:03 -0800)]
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

9 years agoifupdown2: remove up op in config file
Andy Gospodarek [Wed, 3 Dec 2014 03:55:30 +0000 (19:55 -0800)]
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)

9 years agoFix formatting for ifquery check (cosmetic. only fixes prints)
Roopa Prabhu [Tue, 2 Dec 2014 07:19:48 +0000 (23:19 -0800)]
Fix formatting for ifquery check (cosmetic. only fixes prints)

Ticket: CM-3346
Reviewed By:
Testing Done: ifupdown2 sanity + ifquery check tests

9 years agocontinue passing the object to other modules if one of the modules fails
Roopa Prabhu [Mon, 1 Dec 2014 22:54:12 +0000 (14:54 -0800)]
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)

9 years agoCheck for unexpected characters (specifically the ones which look like
Roopa Prabhu [Mon, 1 Dec 2014 05:44:46 +0000 (21:44 -0800)]
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.

9 years agoChange to square brackets (hopefully last change on this before it goes
Roopa Prabhu [Mon, 1 Dec 2014 05:15:10 +0000 (21:15 -0800)]
Change to square brackets (hopefully last change on this before it goes
out)

Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifquery check

9 years agoChange case of check strings
Roopa Prabhu [Fri, 28 Nov 2014 20:48:01 +0000 (12:48 -0800)]
Change case of check strings

Ticket: CM-3346
Reviewed By: cosmetic
Testing Done: ifquery check sanity
(cherry picked from commit 556a078a7f551f1f895f0ddc71b6124d960ffb4e)

9 years agoFix a few more s/br/bridge/g
Roopa Prabhu [Wed, 26 Nov 2014 19:09:50 +0000 (11:09 -0800)]
Fix a few more s/br/bridge/g

Ticket: CM-3346
Reviewed By:
Testing Done:
(cherry picked from commit e63e03e90af531ab660dca03f437f8432337c5d3)

9 years agoDelete stale example files
Roopa Prabhu [Wed, 26 Nov 2014 18:59:58 +0000 (10:59 -0800)]
Delete  stale example files

Ticket: CM-3346
Reviewed By:
Testing Done: sanity tests
(cherry picked from commit ea6f72f628abc3758f4bf665a1c90e6d50860aea)

9 years agoadd a helper switchd ifupdown script that returns reserved vlan range
Roopa Prabhu [Wed, 26 Nov 2014 06:25:33 +0000 (22:25 -0800)]
add a helper switchd ifupdown script that returns reserved vlan range

Ticket:
Reviewed By: CCR-2279
Testing Done: tested ifupdown2 reserved vlan checks

THis patch adds a switchd ifupdown script to return the reserved vlan.

Ifupdown will use this to warn the user when he uses a reserved vlan

(THis patch is a result of wilsons request to have a reserved vlan check
if ifupdown)
(cherry picked from commit 4e693849aba1f1821dba9cfdc567c92baeb23db5)

9 years agoFix setup.py to include new example file names
Roopa Prabhu [Wed, 26 Nov 2014 06:05:02 +0000 (22:05 -0800)]
Fix setup.py to include new example file names

Ticket: CM-3346
Reviewed By:
Testing Done:checked build
(cherry picked from commit ab6e46851087ae0302f1fb457eb6adb8900a13d9)

9 years agoChange names and s/br/bridge/
Roopa Prabhu [Wed, 26 Nov 2014 05:53:38 +0000 (21:53 -0800)]
Change names and s/br/bridge/

Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifupdown2 sanity with all example files
(cherry picked from commit 40a3f646548c35bda34f4d41adb2e935374bb029)

9 years agoMisc fixes. Add a --skip-upperifaces option to ifup (given the confusion
Roopa Prabhu [Tue, 25 Nov 2014 18:19:35 +0000 (10:19 -0800)]
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.

9 years agoChange "source" inclusion errors to warns.
Roopa Prabhu [Fri, 21 Nov 2014 19:07:11 +0000 (11:07 -0800)]
Change "source" inclusion errors to warns.

Ticket: CM-3346
Reviewed By:
Testing Done: tested sanity

9 years agoif 'bridge-vlan-aware yes' specified, explicitly set 1 in bridge sysfs
Roopa Prabhu [Fri, 21 Nov 2014 18:17:37 +0000 (10:17 -0800)]
if 'bridge-vlan-aware yes' specified, explicitly set 1 in bridge sysfs
vlan_filtering flags.

Ticket: CM-3346
Reviewed By:
Testing Done: Tested new bridge driver sanity

9 years agoRemove debug print
Roopa Prabhu [Thu, 20 Nov 2014 01:49:44 +0000 (17:49 -0800)]
Remove debug print

Ticket:
Reviewed By:
Testing Done:

9 years agoFix 'source' file error handling
Roopa Prabhu [Thu, 20 Nov 2014 01:48:02 +0000 (17:48 -0800)]
Fix 'source' file error handling

Ticket:
Reviewed By:
Testing Done:

9 years agoFix a few minor ifquery check failures
Roopa Prabhu [Thu, 20 Nov 2014 01:25:26 +0000 (17:25 -0800)]
Fix a few minor ifquery check failures

Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifupdown2 sanity and query check failures.

9 years agoFix ordering of mstpctl attributes by moving to a OrderedDict
Roopa Prabhu [Wed, 19 Nov 2014 22:42:14 +0000 (14:42 -0800)]
Fix ordering of mstpctl attributes by moving to a OrderedDict

Ticket: CM-3737
Reviewed By:
Testing Done: Tested with config given in the bug

9 years agore-add bridgevlan.py which was accidently removed by previous checkins
Roopa Prabhu [Wed, 19 Nov 2014 22:09:45 +0000 (14:09 -0800)]
re-add bridgevlan.py which was accidently removed by previous checkins

Ticket: CM-3346
Reviewed By:
Testing Done:

9 years agoAdd exclude args to /etc/default/networking
Roopa Prabhu [Wed, 19 Nov 2014 00:58:12 +0000 (16:58 -0800)]
Add exclude args to /etc/default/networking

Ticket: CM-3346
Reviewed By:
Testing Done: Tested service networking restart with exclude interface
list

9 years agoFix address module config (mtu, alias etc) when addr_method is dhcp
Roopa Prabhu [Wed, 19 Nov 2014 00:52:00 +0000 (16:52 -0800)]
Fix address module config (mtu, alias etc) when addr_method is dhcp

Ticket: CA-269
Reviewed By:
Testing Done: Tested setting alias on an interface with addr_method dhcp

9 years agoset arp accept to 1 for bridge devices with an ip and new bridge svi
Roopa Prabhu [Tue, 18 Nov 2014 00:23:42 +0000 (16:23 -0800)]
set arp accept to 1 for bridge devices with an ip and new bridge svi
device (forward port of commit

Ticket: CM-4218
Reviewed By:
Testing Done: Tested with address on new bridge svi and old bridge

9 years agoFix clag example
Roopa Prabhu [Mon, 17 Nov 2014 12:45:45 +0000 (04:45 -0800)]
Fix clag example

Ticket: CM-3346
Reviewed By: scotte
Testing Done:

9 years agoUse 'fdb replace' instead of 'fdb add'
Roopa Prabhu [Sun, 16 Nov 2014 07:36:08 +0000 (23:36 -0800)]
Use 'fdb replace' instead of 'fdb add'

Ticket: CM-4178
Reviewed By:
Testing Done: Tested ifupdown2 with 'address-virtual' attributes

9 years agoChange defaults result strings in ifquery check output
Roopa Prabhu [Sun, 16 Nov 2014 07:34:02 +0000 (23:34 -0800)]
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=

9 years agoFix comment
Roopa Prabhu [Sun, 16 Nov 2014 07:32:56 +0000 (23:32 -0800)]
Fix comment

Ticket: Cm-3346
Reviewed By:
Testing Done:

9 years agoChange warn to debug for gateway del errors during down
Roopa Prabhu [Sun, 16 Nov 2014 07:31:42 +0000 (23:31 -0800)]
Change warn to debug for gateway del errors during down

Ticket: CM-3346
Reviewed By:
Testing Done: trivial

9 years agoAdd vlan aware bridge examples
Roopa Prabhu [Sun, 16 Nov 2014 07:22:01 +0000 (23:22 -0800)]
Add vlan aware bridge examples

Ticket: CM-3346
Reviewed By: pending review
Testing Done: example files are tested

9 years agominor fixes for ifquery and stp handling
Roopa Prabhu [Sat, 15 Nov 2014 23:42:52 +0000 (15:42 -0800)]
minor fixes for ifquery and stp handling

Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifupdown2 sanity

9 years agoFix auto flag handling during reload
Roopa Prabhu [Thu, 13 Nov 2014 06:43:24 +0000 (22:43 -0800)]
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

9 years agoAdd iface 'up' for method 'manual' in addon modules for logical devices
Roopa Prabhu [Wed, 12 Nov 2014 18:51:07 +0000 (10:51 -0800)]
Add iface 'up' for method 'manual' in addon modules for logical devices

Ticket: CM-4125
Reviewed By:
Testing Done: Tested inet manual for logical interfaces

9 years agoMisc fixes + ifreload new option + cleanups + more ifquery support etc
Roopa Prabhu [Wed, 12 Nov 2014 05:58:12 +0000 (21:58 -0800)]
Misc fixes + ifreload new option + cleanups + more ifquery support etc

Ticket: CM-3346, CM-3784, CM-3841
Reviewed By:
Testing Done: various ifupdown2 tests

9 years agoFirst cut ifupdown2 module for vrrpd
Roopa Prabhu [Wed, 12 Nov 2014 05:47:29 +0000 (21:47 -0800)]
First cut ifupdown2 module for vrrpd

Ticket: CM-3454
Reviewed By:
Testing Done: basic testing with vrrpd

There is no check support yet and an open issue
with checking existing ifplugd processes

9 years agoDont warn on fdb del failures during down
Roopa Prabhu [Wed, 12 Nov 2014 05:22:36 +0000 (21:22 -0800)]
Dont warn on fdb del failures during down

Ticket: CM-4178
Reviewed By:
Testing Done: Tested vrr interface up and down

Checking and deleting is expensive. so, ignore delete failures.
Currently logs them at debug level.

9 years agoAdd address-purge attribute to disable purging of addresses on an
Roopa Prabhu [Wed, 12 Nov 2014 05:08:38 +0000 (21:08 -0800)]
Add address-purge attribute to disable purging of addresses on an
interface.

Ticket: CM-3785
Reviewed By:
Testing Done: Tested disabling purging of existing addresses on an
interface with 'address-purge no'.

This helps in cases where some other daemon wants to manage ip addresses
on this interface

9 years agoFix some bond attr gets
Roopa Prabhu [Tue, 11 Nov 2014 14:41:25 +0000 (06:41 -0800)]
Fix some bond attr gets

Ticket: CM-3784
Reviewed By:
Testing Done: Tested querying bond attributes

9 years agoCheckin missing mstpctlutil.py changes for e1e1cf57295dee2ec0df4b1e61c6a7c4e6969402
Roopa Prabhu [Sun, 9 Nov 2014 21:54:33 +0000 (13:54 -0800)]
Checkin missing mstpctlutil.py changes for e1e1cf57295dee2ec0df4b1e61c6a7c4e6969402

Ticket: CM-4141
Reviewed By:
Testing Done:

9 years agolimit macvlan device names to 15chars
Roopa Prabhu [Sat, 8 Nov 2014 14:29:26 +0000 (06:29 -0800)]
limit macvlan device names to 15chars

Ticket: CM-3346
Reviewed By:
Testing Done: sanity test address-virtual lines

9 years agoFix defaults for mstpctl-portp2p
Roopa Prabhu [Sat, 8 Nov 2014 14:14:56 +0000 (06:14 -0800)]
Fix defaults for mstpctl-portp2p

Ticket: CM-4141
Reviewed By:
Testing Done: Tested ifquery running for mstpctl-portp2p

9 years agoAdd /etc/default/networking to provide an easier way to change
Roopa Prabhu [Fri, 7 Nov 2014 23:18:42 +0000 (15:18 -0800)]
Add /etc/default/networking to provide an easier way to change
ifupdown logging from /etc/init.d/networking.

Ticket: CM-3891
Reviewed By:
Testing Done: Tested changing default networking parameters

- This provides a way to log to syslog
- if syslog is not enabled, msgs are output to stdout (in case of boot
  these should be captured by bootlog in > 2.5)

Note that these values only affect logging from the
/etc/init.d/networking script and has nothing to do with ifupdown2
logging when ifupdown2 is used outside of /etc/init.d/networking

9 years agoFix mstpctl attribute names in ifquery running output
Roopa Prabhu [Fri, 7 Nov 2014 00:10:21 +0000 (16:10 -0800)]
Fix mstpctl attribute names in ifquery running output

Ticket: CM-4141
Reviewed By:
Testing Done: Tested with test case in CM-4141 + sanity testing

9 years agoFix mstpctl port attribute ifquery check
Roopa Prabhu [Tue, 4 Nov 2014 19:31:30 +0000 (11:31 -0800)]
Fix mstpctl port attribute ifquery check

Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifquery check mstpctl attributes on bridge port

9 years agoFix vxlan query running
Roopa Prabhu [Tue, 4 Nov 2014 05:47:22 +0000 (21:47 -0800)]
Fix vxlan query running

Ticket: CM-3346
Reviewed By:
Testing Done: vxlan query running

9 years agoFix bridgevlan query check
Roopa Prabhu [Tue, 4 Nov 2014 05:28:14 +0000 (21:28 -0800)]
Fix bridgevlan query check

Ticket: CM-3346
Reviewed By:
Testing Done: tested bridge vlan query check

9 years agomisc query and fdb/vlan add fixes
Roopa Prabhu [Tue, 4 Nov 2014 01:55:51 +0000 (17:55 -0800)]
misc query and fdb/vlan add fixes

Ticket: CM-3346
Reviewed By:
Testing Done: ifupdown2 sanity

9 years agosome more ifquery support (for vxlan devices etc)
Roopa Prabhu [Fri, 31 Oct 2014 18:28:07 +0000 (11:28 -0700)]
some more ifquery support (for vxlan devices etc)

Ticket: CM-3784
Reviewed By:
Testing Done: Tested ifquery check/running and sanity

9 years agoFix -a option documentation
Roopa Prabhu [Wed, 29 Oct 2014 23:44:43 +0000 (16:44 -0700)]
Fix -a option documentation

Ticket: CM-3931
Reviewed By:
Testing Done:

9 years agoRemove stale debug
Roopa Prabhu [Wed, 29 Oct 2014 19:57:57 +0000 (12:57 -0700)]
Remove stale debug

Ticket: CM-3346
Reviewed By:
Testing Done:

9 years agomisc fixes
Roopa Prabhu [Wed, 29 Oct 2014 19:51:21 +0000 (12:51 -0700)]
misc fixes

Ticket: CM-3346
Reviewed By:
Testing Done: ifupdown2 sanity with new bridge driver

9 years agomisc bug fixes for svi address propagation, svi query etc
Roopa Prabhu [Wed, 29 Oct 2014 06:04:40 +0000 (23:04 -0700)]
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

9 years agoBug fixes and some query support
Roopa Prabhu [Tue, 28 Oct 2014 23:10:00 +0000 (16:10 -0700)]
Bug fixes and some query support

Ticket: CM-3346
Reviewed By:
Testing Done: sanity testing and syntax testing for new bridge driver

9 years agoInclude '-' in regex for globs
Roopa Prabhu [Sat, 25 Oct 2014 03:48:38 +0000 (20:48 -0700)]
Include '-' in regex for globs

Ticket: CM-3346
Reviewed By:
Testing Done: Sanity test

9 years agoFix bridge port vid settings during ifup of a bridge port
Roopa Prabhu [Sat, 25 Oct 2014 03:43:50 +0000 (20:43 -0700)]
Fix bridge port vid settings during ifup of a bridge port

Ticket: CM-3346
Reviewed By:
Testing Done: ifupdown2 sanity test for the new bridge driver

9 years agoremove code that makes a bridge port inherit stp/mstp/igmp attributes from bridge
Roopa Prabhu [Fri, 24 Oct 2014 21:21:54 +0000 (14:21 -0700)]
remove code that makes a bridge port inherit stp/mstp/igmp attributes from bridge

Ticket: CM-4035
Reviewed By:
Testing Done: Tested ifupdown2 sanity

9 years agoFirst phase checkin for new format for vlan aware bridge
Roopa Prabhu [Fri, 24 Oct 2014 17:11:07 +0000 (10:11 -0700)]
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

9 years agoFix missing import due to merge
Roopa Prabhu [Wed, 22 Oct 2014 20:42:08 +0000 (13:42 -0700)]
Fix missing import due to merge

Ticket:
Reviewed By:
Testing Done:

9 years agoFix bridge deletion
Roopa Prabhu [Mon, 13 Oct 2014 17:07:36 +0000 (10:07 -0700)]
Fix bridge deletion

Ticket: CM-3346
Reviewed By:
Testing Done: Tested bridge up/down

9 years agoSet RLIMIT_CORE to zero. For some reason the core file size is huge.
Roopa Prabhu [Mon, 13 Oct 2014 16:55:21 +0000 (09:55 -0700)]
Set RLIMIT_CORE to zero. For some reason the core file size is huge.

Ticket: CM-3346
Reviewed By:
Testing Done: ifupdown2 sanity

I dont see a real reason for a core file to debug ifupdown2 problems
currently. Will re-enable core file generation when i root cause the
issue.

9 years agoAdd rtnetlink api's for link creates
Roopa Prabhu [Sun, 12 Oct 2014 20:50:05 +0000 (13:50 -0700)]
Add rtnetlink api's for link creates

Ticket: CM-3346
Reviewed By:
Testing Done:

9 years agoReplace check mark by none and cross mark by ascii 'x' in --check output
Roopa Prabhu [Fri, 10 Oct 2014 21:52:11 +0000 (14:52 -0700)]
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

9 years agoFix a few ordering issues + fix following upperiface for bridge device
Roopa Prabhu [Fri, 10 Oct 2014 21:05:19 +0000 (14:05 -0700)]
Fix a few ordering issues + fix following upperiface for bridge device

Ticket: CM-3346
Reviewed By:
Testing Done: sanity test

9 years agoMake query check a no-op for the vlan aware bridge until correctly fixed
Roopa Prabhu [Fri, 10 Oct 2014 04:22:12 +0000 (21:22 -0700)]
Make query check a no-op for the vlan aware bridge until correctly fixed

Ticket: CM-3346
Reviewed By:
Testing Done: sanity test

9 years agoRemove stale mstp adminadge attributes
Roopa Prabhu [Fri, 10 Oct 2014 02:26:10 +0000 (19:26 -0700)]
Remove stale mstp adminadge attributes

Ticket: CM-3346
Reviewed By: sashok
Testing Done: sanity test

9 years agoA few more fixes to the vlan aware bridge case
Roopa Prabhu [Fri, 10 Oct 2014 02:10:20 +0000 (19:10 -0700)]
A few more fixes to the vlan aware bridge case

Ticket: CM-3346
Reviewed By:
Testing Done: Tested with new and old bridge formats

9 years agoMove ifupdown2addons into ifupdown2 pacakge
Roopa Prabhu [Thu, 9 Oct 2014 23:02:46 +0000 (16:02 -0700)]
Move ifupdown2addons into ifupdown2 pacakge

Ticket: CM-3864
Reviewed By:
Testing Done: Tested build and install

open item:
- cleanup stale ifupdown2-addons package files

9 years agomore support and fixes to support new format for vlan filtering bridge
Roopa Prabhu [Thu, 9 Oct 2014 19:58:16 +0000 (12:58 -0700)]
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.

9 years agosupport for new bridge driver syntax
Roopa Prabhu [Mon, 6 Oct 2014 18:11:10 +0000 (11:11 -0700)]
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.

9 years agoMinor fixes for multiple interfaces with the same config + performance
Roopa Prabhu [Fri, 26 Sep 2014 21:23:15 +0000 (14:23 -0700)]
Minor fixes for multiple interfaces with the same config + performance
fix for the dependency graph generator code

Ticket:
Reviewed By:
Testing Done: sanity test

9 years agoInitial checkin for ifup/ifdown svi config
Roopa Prabhu [Thu, 25 Sep 2014 17:55:08 +0000 (10:55 -0700)]
Initial checkin for ifup/ifdown svi config

Ticket:
Reviewed By:
Testing Done: Tested with old and new bridge driver

Examples:
old bridge driver:
%for v in range(100, 104):
auto br${v}
iface br${v}
    bridge-ports uplink1.${v} peerlink.${v} downlink.${v} glob
swp2-4.${v}
    bridge-stp on
    svi-router-ip 11.${v/256}.${v%256}.240/24
    svi-router-mac 00:00:5e:00:01:00
    svi-router-virtual-ip 11.${v/256}.${v%256}.241/24
    svi-router-virtual-mac 00:11:22:33:44:00
%endfor

new bridge driver:
%for v in range(100, 101):
auto br0.${v}
iface br0.${v}
    svi-router-ip 11.${v/256}.${v%256}.240/24
    svi-router-mac 00:00:5e:00:01:00
    svi-router-virtual-ip 11.${v/256}.${v%256}.241/24
    svi-router-virtual-mac 00:11:22:33:44:00
%endfor

Pending issues:
- optimization (its slow with 2000 svi's today)
- ifquery check and running support
- names of attributes and macvlan interfaces may change after review

9 years agoMerge branch 'master' of ssh://dev.cumulusnetworks.com/home/trac/cumulus
Cumulus Builds [Sat, 30 Aug 2014 22:38:46 +0000 (15:38 -0700)]
Merge branch 'master' of ssh://dev.cumulusnetworks.com/home/trac/cumulus

Conflicts:
patches/bcm-sdk/series

9 years agoMerge branch 'vmware_L2'
Cumulus Builds [Sat, 30 Aug 2014 19:35:23 +0000 (12:35 -0700)]
Merge branch 'vmware_L2'

Conflicts:
build-config/conf/extra-pkgs
build-config/conf/linux.vci.config
build-config/conf/snapshot-manifest-amd64
build-config/conf/version
build-config/make/bcm-sdk.make
build-config/make/local-pkgs.make
build-config/make/local-pkgs2.make
packages/cafe/scripts/build.py
packages/cl-platform-config/usr/share/platform-config/accton/as6701_32x/etc/bcm.d/config.d/01config.bcm
packages/cl-platform-config/usr/share/platform-config/cel/smallstone/etc/bcm.d/config.d/01config.bcm
packages/cl-platform-config/usr/share/platform-config/dell/s6000_s1220/etc/bcm.d/config.d/01config.bcm
packages/cl-utilities/usr/share/cumulus/support/functions
packages/cl-utilities/usrlib/datapath-update
packages/clag/init.d/clagd
packages/clag/man/clagctl.8
packages/clag/sbin/clagctl
packages/clag/sbin/clagd
packages/clag/setup.py
packages/ifupdown2-addons/addons/bridge.py
packages/ifupdown2-addons/pkg/bridgeutils.py
packages/ifupdown2-addons/pkg/ifenslaveutil.py
packages/ifupdown2-addons/pkg/iproute2.py
packages/ifupdown2-addons/pkg/modulebase.py
packages/ifupdown2/pkg/ifupdownmain.py
packages/ifupdown2/pkg/networkinterfaces.py
packages/ifupdown2/pkg/scheduler.py
packages/portwd/portwd
packages/ptm/ptm_conf.c
patches/bcm-sdk/series
patches/bridge-utils/series
patches/iproute/fix-bridge-batch.patch
patches/iproute/fix-fdb-add.patch
patches/iproute/ip-add-batch-mode-to-man-page.patch
patches/iproute/series
patches/iproute/show-fdb-bridge.patch
patches/kernel/debian-cumulus-controlfiles.patch
patches/kernel/network-bridge-fdb-learn-priority.patch
patches/kernel/network-bridge-igmp-fast-leave.patch
patches/kernel/network-bridge-igmpv3.patch
patches/kernel/network-bridge-querier-ifaddr.patch
patches/kernel/network-bridge-use-spin_lock_bh-from-process-context.patch
patches/kernel/network-tun-ethtool.patch
patches/kernel/network-vxlan-fix-fdb-update.patch
patches/kernel/series
patches/libnl/series
rootconf/default/etc/cumulus/switchd.conf
switchd/hal.c
switchd/hal.h
switchd/hal_bcm.c
switchd/hal_bcm_vxlan.c
switchd/hal_config.c
switchd/hal_dummy.c
switchd/hal_int.h
switchd/hal_util.c
switchd/switchd.c
switchd/sync.c
tests/config/__init__.py
tests/config/default.cfg
tests/examples/testssim2.py
tests/infra/testssim2.py
tests/smoke/testifupdown2.py
tests/tests/examples/testssim2.py
utilities/distro-cmd
utilities/packages/ssim2/simlib.py
utilities/packages/testfu/scripts/runteststmpl.sh
utilities/packages/testfu/scripts/xmltoresults.py

9 years agoFix leftover func call possibly due to merge + some cleanup
Roopa Prabhu [Tue, 26 Aug 2014 23:17:49 +0000 (16:17 -0700)]
Fix leftover func call possibly due to merge + some cleanup

Ticket: CM-3542
Reviewed By:
Testing Done:

9 years agoFix a few options
Roopa Prabhu [Tue, 26 Aug 2014 21:19:13 +0000 (14:19 -0700)]
Fix a few options

Ticket: CM-3529
Reviewed By:
Testing Done: checked man pages

9 years agoMerge branch 'CumulusLinux-2.1_br'
Cumulus Builds [Mon, 25 Aug 2014 01:39:31 +0000 (18:39 -0700)]
Merge branch 'CumulusLinux-2.1_br'

Conflicts:
build-config/Makefile
build-config/conf/extra-pkgs
build-config/conf/linux.amd64.config
build-config/conf/linux.powerpc-e500.config
build-config/conf/linux.vci.config
build-config/conf/snapshot-manifest-amd64
build-config/conf/snapshot-manifest-powerpc
build-config/installer/arch/amd64-installer-functions
build-config/installer/cumulus/init/im_n29xx_t40n/platform.conf
build-config/make/bcm-sdk.make
build-config/make/images.make
build-config/make/kernel.make
build-config/make/lkm.make
build-config/make/local-pkgs.make
build-config/make/local-pkgs2.make
build-config/scripts/kernel-builddeb
build-config/scripts/mkimage-amd64.sh
modules/Makefile
modules/accton_as5712_54x_platform.c
modules/cel_redstone_xp_muxpld.c
modules/dell_s6000_platform.c
modules/platform_defs.h
packages/cafe/clobjects.py
packages/cafe/scripts/build.py
packages/cafe/scripts/supporttarball.py
packages/cafe/scripts/test_ci.sh
packages/cl-basefiles/etc/cumulus/datapath/traffic.conf
packages/cl-image/bin/cl-img-install
packages/cl-image/bin/cl-img-select
packages/cl-image/img/functions
packages/cl-platform-config/usr/share/platform-config/accton/as5712_54x/bin/eeprom.py
packages/cl-platform-config/usr/share/platform-config/accton/as5712_54x/etc/bcm.d/config.d/01config.bcm
packages/cl-platform-config/usr/share/platform-config/accton/as5712_54x/etc/modules
packages/cl-platform-config/usr/share/platform-config/accton/as5712_54x/etc/sensors.d/accton_as5712_54x.conf
packages/cl-platform-config/usr/share/platform-config/accton/as6701_32x/etc/bcm.d/config.d/01config.bcm
packages/cl-platform-config/usr/share/platform-config/cel/redstone_xp/bin/eeprom.py
packages/cl-platform-config/usr/share/platform-config/cel/redstone_xp/etc/bcm.d/config.d/01config.bcm
packages/cl-platform-config/usr/share/platform-config/cel/redstone_xp/etc/bcm.d/default_config_values
packages/cl-platform-config/usr/share/platform-config/cel/redstone_xp/etc/bcm.d/hw_desc
packages/cl-platform-config/usr/share/platform-config/cel/redstone_xp/etc/bcm.d/rc.soc
packages/cl-platform-config/usr/share/platform-config/cel/redstone_xp/etc/modules
packages/cl-platform-config/usr/share/platform-config/cel/redstone_xp/etc/sensors.d/cel_redstone_xp.conf
packages/cl-platform-config/usr/share/platform-config/cel/redstone_xp/hw_init.d/S20qsfp_init.sh
packages/cl-platform-config/usr/share/platform-config/cel/smallstone/etc/bcm.d/config.d/01config.bcm
packages/cl-platform-config/usr/share/platform-config/dell/s6000_s1220/bin/eeprom.py
packages/cl-platform-config/usr/share/platform-config/dell/s6000_s1220/etc/bcm.d/config.d/01config.bcm
packages/cl-platform-config/usr/share/platform-config/dell/s6000_s1220/etc/modules
packages/cl-platform-config/usr/share/platform-config/dell/s6000_s1220/etc/sensors.d/dell_s6000_s1220.conf
packages/cl-platform-config/usr/share/platform-config/dni/c7448n/etc/bcm.d/default_config_values
packages/cl-platform-config/usr/share/platform-config/dni/c7448n/etc/bcm.d/hw_desc
packages/cl-platform-config/usr/share/platform-config/im/n29xx_t40n/etc/bcm.d/rc.soc
packages/cl-platform-config/usr/share/platform-config/im/n29xx_t40n/etc/cumulus/ports.conf
packages/cl-platform-config/usr/share/platform-config/quanta/ly6_p2020/etc/bcm.d/config.d/01config.bcm
packages/cl-utilities/dist-packages/cumulus/__chip_config/bcm/Trident/rc.forwarding
packages/cl-utilities/dist-packages/cumulus/__chip_config/bcm/TridentTwo/rc.forwarding
packages/cl-utilities/dist-packages/cumulus/__chip_config/bcm/Triumph/rc.forwarding
packages/cl-utilities/dist-packages/cumulus/__chip_config/bcm/datapath.conf
packages/cl-utilities/dist-packages/cumulus/platform.py
packages/cl-utilities/dist-packages/cumulus/platforms/accton.py
packages/cl-utilities/dist-packages/cumulus/platforms/cel.py
packages/cl-utilities/dist-packages/cumulus/platforms/dell.py
packages/cl-utilities/dist-packages/cumulus/platforms/quanta.py
packages/cl-utilities/dist-packages/cumulus/portconfig.py
packages/cl-utilities/dist-packages/cumulus/sensors.py
packages/cl-utilities/rst/pwmd.8.rst
packages/cl-utilities/rst/smonctl.8.rst
packages/cl-utilities/usrlib/datapath-config
packages/cl-utilities/usrlib/datapath-update
packages/cl-utilities/usrlib/update-ports
packages/clag/man/clagctl.8
packages/clag/man/clagd.8
packages/clag/sbin/clagctl
packages/clag/sbin/clagd
packages/clag/setup.py
packages/ifupdown2-addons/addons/bridge.py
packages/ifupdown2-addons/addons/mstpctl.py
packages/ifupdown2-addons/pkg/bridgeutils.py
packages/ifupdown2-addons/pkg/ifenslaveutil.py
packages/ifupdown2-addons/pkg/modulebase.py
packages/ifupdown2/init.d/networking
packages/ifupdown2/pkg/iface.py
packages/ifupdown2/pkg/ifupdownbase.py
packages/ifupdown2/pkg/ifupdownmain.py
packages/ifupdown2/pkg/networkinterfaces.py
packages/ifupdown2/pkg/scheduler.py
packages/ifupdown2/sbin/ifupdown
packages/iorw/Makefile
packages/iorw/iorw.c
packages/lnv/debian/control
packages/lnv/debian/install
packages/lnv/debian/lnv-dsr.init
packages/lnv/debian/lnv-pdd.init
packages/lnv/debian/postinst
packages/lnv/lnv-dsr
packages/lnv/lnv-pdd
packages/lnv/lnv.conf
packages/lnv/lnv/common.py
packages/lnv/lnv/config.py
packages/ptm/debian/ptmd.install
patches/bcm-sdk/series
patches/bridge-utils/remove-ifupdown-support.patch
patches/ethtool/force-speed-and-duplex-setting.patch
patches/ethtool/series
patches/iproute/series
patches/iproute/update-neighbour-h-to-latest-upstream.patch
patches/kernel/arch-intel-centerton-reboot-cf9.patch
patches/kernel/debian-cumulus-controlfiles.patch
patches/kernel/driver-hwmon-max6620-fix-rpm-calc.patch
patches/kernel/driver-hwmon-pmbus-dni_dps460.patch
patches/kernel/driver-support-intel-avoton-ethernet-with-broadcom-phy.patch
patches/kernel/network-bridge-igmp-fast-leave.patch
patches/kernel/network-bridge-igmpv3.patch
patches/kernel/network-bridge-querier-ifaddr.patch
patches/kernel/network-bridge-use-spin_lock_bh-from-process-context.patch
patches/kernel/network-ipv6-route-fix-multipath-duplicate-nexthops.patch
patches/kernel/network-tun-ethtool.patch
patches/kernel/series
patches/libnl/series
patches/lldpd/add-rport-notification-on-linkdown.patch
patches/lldpd/series
patches/monit/cumulus-monitrc.patch
patches/monit/series
patches/quagga/bgp-interface-config.patch
patches/quagga/bgpd-anvl-aggregate-failures.patch
patches/quagga/bgpd-as-override.patch
patches/quagga/bgpd-atomic-aggregate-missing.patch
patches/quagga/bgpd-connected-nht.patch
patches/quagga/bgpd-establish-peers-faster.patch
patches/quagga/bgpd-event-driven-route-map-updates.patch
patches/quagga/bgpd-fsm-fix.patch
patches/quagga/bgpd-gr-route-selection-fix.patch
patches/quagga/bgpd-maxmed-administrative-onstartup.patch
patches/quagga/bgpd-pfxrcd-include-unuseable.patch
patches/quagga/bgpd-route-map-dry-run.patch
patches/quagga/bgpd-route-map-match-interface.patch
patches/quagga/bgpd-rr-allow-policy-outbound.patch
patches/quagga/bgpd-save-last-bad-msg.patch
patches/quagga/bgpd-scale-update-delay-packing.patch
patches/quagga/nexthop-tracking.patch
patches/quagga/ospfd-mi.patch
patches/quagga/ospfd-p2p-destination-fix.patch
patches/quagga/ptm-bfd-integration.patch
patches/quagga/quagga-faster-compile.patch
patches/quagga/series
patches/quagga/zebra-client-info-detail.patch
patches/quagga/zebra-nht-routemap.patch
patches/quagga/zebra-recursive-route.patch
patches/quagga/zebra-redistribute-table.patch
patches/quagga/zebra-route-tags.patch
patches/quagga/zebra-set-src-routemap.patch
patches/quagga/zebra-static-route-nht.patch
rootconf/default/etc/cumulus/switchd.conf
rootconf/default/home/cumulus/sysroot-complete
rootconf/default/home/cumulus/sysroot-config
switchd/hal.c
switchd/hal.h
switchd/hal_acl_bcm.c
switchd/hal_bcm.c
switchd/hal_bcm.h
switchd/hal_bcm_vxlan.c
switchd/hal_dummy.c
switchd/hal_int.h
switchd/hal_util.c
switchd/netlink.c
switchd/switchd.c
switchd/sync.c
tests/config/__init__.py
tests/config/default.cfg
tests/data/specs/bgp_stress.py
tests/examples/testssim2.py
tests/infra/testssim2.py
tests/l2/l2_lldp_test.py
tests/l3/bgp_alpm_test.py
tests/l3/bgp_msft_fastreboot_test.py
tests/l3/bgp_scale_amzn_test.py
tests/l3/bgp_smoke_test.py
tests/l3/bgp_v4_v6.py
tests/l3/l3_helper.py
tests/l3/traffic_utils.py
tests/l3/zebra_test.py
tests/lib/decorators.py
tests/platform/cl-img.py
tests/smoke/testcommands.py
tests/smoke/testifupdown2.py
tests/smoke/testneighborcheck.py
tests/smoke/testroutecheck.py
tests/smoke/testroutes2.py
tests/tests/examples/testssim2.py
utilities/distro-cmd
utilities/packages/autolib/fs.py
utilities/packages/autolib/netobjects.py
utilities/packages/autolib/scripts/watch.py
utilities/packages/autolib/timeout.py
utilities/packages/ssim2/net.py
utilities/packages/ssim2/scripts/nodecom.py
utilities/packages/ssim2/simlib.py
utilities/packages/ssim2/spec.py
utilities/packages/ssim2/templates/interfaces.tmpl
utilities/packages/testfu/buildout.cfg
utilities/packages/testfu/scripts/runteststmpl.sh
utilities/packages/testfu/scripts/xmltoresults.py

9 years agoRevert "log /etc/init.d/networking errors into syslog using /usr/bin/logger"
Wilson Kok [Mon, 28 Jul 2014 04:28:46 +0000 (21:28 -0700)]
Revert "log /etc/init.d/networking errors into syslog using /usr/bin/logger"

This reverts commit 99d97bfcd931d40b84387f073a6c1b16866fc1e2.

9 years agoRevert "log /etc/init.d/networking errors into syslog using /usr/bin/logger"
Wilson Kok [Fri, 25 Jul 2014 17:33:44 +0000 (10:33 -0700)]
Revert "log /etc/init.d/networking errors into syslog using /usr/bin/logger"

This reverts commit 99d97bfcd931d40b84387f073a6c1b16866fc1e2.

9 years agoRemove exclude lo
Roopa Prabhu [Tue, 22 Jul 2014 22:34:15 +0000 (15:34 -0700)]
Remove exclude lo

Ticket: CM-3300
Reviewed By:
Testing Done: Tested reboot/shutdown and service networking restart

9 years agoDocumentation cleanup
Roopa Prabhu [Tue, 22 Jul 2014 18:15:56 +0000 (11:15 -0700)]
Documentation cleanup

Ticket:
Reviewed By:
Testing Done:

- these changes are mainly related to api doc generation using sphinx

9 years agoDoc updates + cleanup
Roopa Prabhu [Thu, 17 Jul 2014 18:44:36 +0000 (11:44 -0700)]
Doc updates + cleanup

Ticket: CM-2297
Reviewed By:
Testing Done: compile tested

more updates coming ...

9 years agoFix return value when upperifaces are brought up
Roopa Prabhu [Fri, 11 Jul 2014 04:08:21 +0000 (21:08 -0700)]
Fix return value when upperifaces are brought up

Ticket: CM-3208
Reviewed By:
Testing Done: Tested with testcase listed in the bug

This patch does the following:
- moves the interface error exit check to before upperifaces are brought
  up
- changes errors to warns on upperiface error (this is because
  upperiface 'up' is done as best effort to reconfigure the interface in
  question as slave device to the upper device. But if the upper device
  is not in a right state config steps can fail. And we should just
warn).
- Implicitly bringing up the upperifaces helps in most of the cases. especially
  when a bond is brought down and up. The upperiface handling code adds
  the bond back into bridges it was part of. or creates the vlan devices
  on the bond that got deleted. But there can be cases where upperifaces are
  not in the right state and this results in warnings.

  To disable the implicit upperiface handling, this patch also supports
  'skip_upperifaces=1' in /etc/network/ifupdown2/ifupdown2.conf

in future, i am thinking of an option --skip-upperifaces to ifup

9 years agolog /etc/init.d/networking errors into syslog using /usr/bin/logger
Roopa Prabhu [Thu, 10 Jul 2014 03:23:21 +0000 (20:23 -0700)]
log /etc/init.d/networking errors into syslog using /usr/bin/logger

Ticket: CM-3193
Reviewed By:
Testing Done: Tested logging of errors in syslog from ifup at bootup

Example error msg:
"Jul 10 03:13:17 cumulus /etc/init.d/networking[1183]: error:
/etc/network/interfaces: line16: invalid auto line 'auto'"

This patch logs into syslog only during bootup

9 years agoAdd a new ifupdown2 example to cover bridge igmp and mstp attributes
Roopa Prabhu [Wed, 9 Jul 2014 21:14:14 +0000 (14:14 -0700)]
Add a new ifupdown2 example to cover bridge igmp and mstp attributes

Ticket: CM-1438
Reviewed By: TBD
Testing Done: Tested the example file with ifupdown2

9 years agoBump kernel ethtool get/set wait to 20 + ifupdown2 convert ethtool
Roopa Prabhu [Tue, 8 Jul 2014 15:52:05 +0000 (08:52 -0700)]
Bump kernel ethtool get/set wait to 20 + ifupdown2 convert ethtool
errors to warns

Ticket: CM-3159
Reviewed By: briefly ran this by jtoppins and andy (sfeldma is on
vacation this week).
Testing Done: tested ifupdown2 with ethtool config during boot (sam will
also be adding the testcase mentioned in the bug to ifupdown2 smoke)

The kernel timeout increase helps right now.
we should revisit this again in 2.3 to close all corner cases.

ifupdown2 will now warn on ethtool errors and will also return
non-zero exit status

9 years agoFix use of args.CLASS with ifreload (reload does not support CLASS yet).
Roopa Prabhu [Mon, 7 Jul 2014 18:30:52 +0000 (11:30 -0700)]
Fix use of args.CLASS with ifreload (reload does not support CLASS yet).

Ticket: CM-3176
Reviewed By: trivial
Testing Done: Tested ifreload with the testcase in the bug

This broke when i recently fixed --allow-classes support for ifup/ifdown

9 years agoFix error flag for cases where errors are ignored (part of commit
Roopa Prabhu [Thu, 3 Jul 2014 21:43:26 +0000 (14:43 -0700)]
Fix error flag for cases where errors are ignored (part of commit
3afb698d60a7ec0bb3029efccc82c0bd1aa49197)

Ticket: CM-2960
Reviewed By:
Testing Done: ifupdown2 sanity + precommit

9 years agoexit with non-zero return code if any of the ifaces have errors
Roopa Prabhu [Wed, 2 Jul 2014 17:03:02 +0000 (10:03 -0700)]
exit with non-zero return code if any of the ifaces have errors

Ticket: CM-2960
Reviewed By:
Testing Done: ifupdown2 sanity + error cases + precommit

uses a class variable to store return value

9 years agoFix splits everywhere to include space and tabs. Use regex split
Roopa Prabhu [Sat, 28 Jun 2014 06:44:36 +0000 (23:44 -0700)]
Fix splits everywhere to include space and tabs. Use regex split

Ticket: CM-3121
Reviewed By:
Testing Done: Ran precommit

Conflicts:
packages/ifupdown2-addons/pkg/modulebase.py

9 years agoFix handling of interfaces with `--allow CLASS`
Roopa Prabhu [Wed, 25 Jun 2014 22:23:04 +0000 (15:23 -0700)]
Fix handling of interfaces with `--allow CLASS`

Ticket: CM-3105
Reviewed By:
Testing Done: precommit and some interface class tests

- the patch mostly involves code reorg

9 years agoFix scheduler for --allow <classes> option
Roopa Prabhu [Sun, 15 Jun 2014 05:53:23 +0000 (22:53 -0700)]
Fix scheduler for --allow <classes> option

Ticket:
Reviewed By: nobody
Testing Done: Tested --allow <classes>

9 years agoFix whitespace issue + uninitialized variable issue
Roopa Prabhu [Fri, 13 Jun 2014 13:15:40 +0000 (06:15 -0700)]
Fix whitespace issue + uninitialized variable issue

Ticket: CM-2997
Reviewed By: shm
Testing Done: Ran precommit

9 years agoFix upperiface check when ifdown is run with -a
Roopa Prabhu [Fri, 13 Jun 2014 13:08:40 +0000 (06:08 -0700)]
Fix upperiface check when ifdown is run with -a

Ticket: CM-3007
Reviewed By: shm + patch was pasted in the bug for review
Testing Done: ran precommit + maliks test + malik ran his test on his
box

When -a is specified ifupdown2 works on all interfaces and since the the
upperiface check is a bit expensive i had a "skip" on that.
And so far all the user commands i have seen only work on the $IFACE and
not its dependents. So, never hit this case.

9 years agoprefix ethtool attributes with "link-" to be compatible with
Roopa Prabhu [Thu, 12 Jun 2014 13:27:29 +0000 (06:27 -0700)]
prefix ethtool attributes with "link-" to be compatible with
native ifupdown + documentation fixes

Ticket: CM-3000
Reviewed By: trivial + doc related
Testing Done: Ran precommit

9 years agoAdd close_fds=True in ifupdownbase class
Roopa Prabhu [Tue, 3 Jun 2014 18:11:47 +0000 (11:11 -0700)]
Add close_fds=True in ifupdownbase class

Ticket: CM-2899
Reviewed By:
Testing Done: Tested ifupdown sanity

Just closing all the places where we could leak fds.

9 years agoFix return value when upperifaces are brought up
Roopa Prabhu [Fri, 11 Jul 2014 04:08:21 +0000 (21:08 -0700)]
Fix return value when upperifaces are brought up

Ticket: CM-3208
Reviewed By:
Testing Done: Tested with testcase listed in the bug

This patch does the following:
- moves the interface error exit check to before upperifaces are brought
  up
- changes errors to warns on upperiface error (this is because
  upperiface 'up' is done as best effort to reconfigure the interface in
  question as slave device to the upper device. But if the upper device
  is not in a right state config steps can fail. And we should just
warn).
- Implicitly bringing up the upperifaces helps in most of the cases. especially
  when a bond is brought down and up. The upperiface handling code adds
  the bond back into bridges it was part of. or creates the vlan devices
  on the bond that got deleted. But there can be cases where upperifaces are
  not in the right state and this results in warnings.

  To disable the implicit upperiface handling, this patch also supports
  'skip_upperifaces=1' in /etc/network/ifupdown2/ifupdown2.conf

in future, i am thinking of an option --skip-upperifaces to ifup

9 years agolog /etc/init.d/networking errors into syslog using /usr/bin/logger
Roopa Prabhu [Thu, 10 Jul 2014 03:23:21 +0000 (20:23 -0700)]
log /etc/init.d/networking errors into syslog using /usr/bin/logger

Ticket: CM-3193
Reviewed By:
Testing Done: Tested logging of errors in syslog from ifup at bootup

Example error msg:
"Jul 10 03:13:17 cumulus /etc/init.d/networking[1183]: error:
/etc/network/interfaces: line16: invalid auto line 'auto'"

This patch logs into syslog only during bootup