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

229 Commits

Author SHA1 Message Date
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
724a5011b9 Remove stale debug
Ticket:
Reviewed By:
Testing Done:
2014-12-09 14:26:11 -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
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
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
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
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
7ce1bb50e9 Fix a few more s/br/bridge/g
Ticket: CM-3346
Reviewed By:
Testing Done:
(cherry picked from commit e63e03e90af531ab660dca03f437f8432337c5d3)
2014-11-26 13:08:08 -08:00
Roopa Prabhu
5e4f0612fa Delete stale example files
Ticket: CM-3346
Reviewed By:
Testing Done: sanity tests
(cherry picked from commit ea6f72f628abc3758f4bf665a1c90e6d50860aea)
2014-11-26 13:07:55 -08:00
Roopa Prabhu
19f8bb0b39 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)
2014-11-26 13:07:45 -08:00
Roopa Prabhu
e8278339d3 Fix setup.py to include new example file names
Ticket: CM-3346
Reviewed By:
Testing Done:checked build
(cherry picked from commit ab6e46851087ae0302f1fb457eb6adb8900a13d9)
2014-11-26 13:07:34 -08:00
Roopa Prabhu
8c8dab1a3f 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)
2014-11-26 13:07:12 -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
11f3290e60 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
2014-11-21 10:17:37 -08:00
Roopa Prabhu
d6e2eb5705 Remove debug print
Ticket:
Reviewed By:
Testing Done:
2014-11-19 17:49:44 -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
4c39c7b84a Fix ordering of mstpctl attributes by moving to a OrderedDict
Ticket: CM-3737
Reviewed By:
Testing Done: Tested with config given in the bug
2014-11-19 14:42:14 -08:00
Roopa Prabhu
045ad9a394 re-add bridgevlan.py which was accidently removed by previous checkins
Ticket: CM-3346
Reviewed By:
Testing Done:
2014-11-19 14:09:45 -08:00
Roopa Prabhu
6ab14132fb Add exclude args to /etc/default/networking
Ticket: CM-3346
Reviewed By:
Testing Done: Tested service networking restart with exclude interface
list
2014-11-18 16:58:12 -08:00
Roopa Prabhu
68d9fee038 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
2014-11-18 16:52:00 -08:00
Roopa Prabhu
75afe2a7f4 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
2014-11-17 16:23:42 -08:00
Roopa Prabhu
84bf47c60a Fix clag example
Ticket: CM-3346
Reviewed By: scotte
Testing Done:
2014-11-17 04:45:45 -08:00
Roopa Prabhu
205cde7218 Use 'fdb replace' instead of 'fdb add'
Ticket: CM-4178
Reviewed By:
Testing Done: Tested ifupdown2 with 'address-virtual' attributes
2014-11-15 23:36:08 -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
a5bbc8ed41 Fix comment
Ticket: Cm-3346
Reviewed By:
Testing Done:
2014-11-15 23:32:56 -08:00
Roopa Prabhu
bcf11b14f8 Change warn to debug for gateway del errors during down
Ticket: CM-3346
Reviewed By:
Testing Done: trivial
2014-11-15 23:31:42 -08:00
Roopa Prabhu
7e39bbdfcf Add vlan aware bridge examples
Ticket: CM-3346
Reviewed By: pending review
Testing Done: example files are tested
2014-11-15 23:22:01 -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
e8b4b06dc0 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
2014-11-12 10:51:07 -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
830c91d7e6 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
2014-11-11 21:47:29 -08:00
Roopa Prabhu
a9d3664814 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.
2014-11-11 21:22:36 -08:00
Roopa Prabhu
394e68b526 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
2014-11-11 21:08:38 -08:00
Roopa Prabhu
72213d5a2d Fix some bond attr gets
Ticket: CM-3784
Reviewed By:
Testing Done: Tested querying bond attributes
2014-11-11 06:41:25 -08:00
Roopa Prabhu
2ca1b8847a Checkin missing mstpctlutil.py changes for e1e1cf57295dee2ec0df4b1e61c6a7c4e6969402
Ticket: CM-4141
Reviewed By:
Testing Done:
2014-11-09 13:54:33 -08:00
Roopa Prabhu
aaef0a7928 limit macvlan device names to 15chars
Ticket: CM-3346
Reviewed By:
Testing Done: sanity test address-virtual lines
2014-11-08 06:29:26 -08:00
Roopa Prabhu
e759a20abf Fix defaults for mstpctl-portp2p
Ticket: CM-4141
Reviewed By:
Testing Done: Tested ifquery running for mstpctl-portp2p
2014-11-08 06:14:56 -08:00
Roopa Prabhu
261379f01b 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
2014-11-07 15:18:42 -08:00
Roopa Prabhu
7adb4b77ab Fix mstpctl attribute names in ifquery running output
Ticket: CM-4141
Reviewed By:
Testing Done: Tested with test case in CM-4141 + sanity testing
2014-11-06 16:10:21 -08:00