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

74 Commits

Author SHA1 Message Date
Roopa Prabhu
717cee3187 addons: dhcp: add vrf awareness
Ticket: CM-10292, CM-10282
Reviewed By: dsa, nikhil, julien
Testing Done: Tested dhcp config on an vrf slave

- Add support for policy module_globals variable
  "vrf-exec-cmd-prefix". It is read into per module
  self.vrf_exec_cmd_prefix variable

- If self.vrf_exec_cmd_prefix is present and interface is a
  vrf slave, use ifupdown2 will call such command in vrf
  context using:
    "%s %s %s" %(<vrf-exec-cmd-prefix>, <vrfname>, <cmd>)

- This also fixes calling of dhcp refresh when a dhcp slave is
  removed from a vrf

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-04-12 23:13:41 -07:00
Julien Fortin
a4a53f4b45 fixing: ifupdown2 (subprocesses) lives on after control-c + Parsing cmd string with shlex.split instead of string.split
Ticket: CM-9905
Reviewed By: CCR-4363
Testing Done: ^C ifupdown2 while ifreload-ing interfaces test files (~500ifaces) + smoke tests
2016-04-10 18:55:56 +02:00
Roopa Prabhu
74d8271b1f ifupdownaddons: iproute2: when you invalidate the cache, make sure the cache flag is reset
Ticket: CM-10302
Reviewed By: julien
Testing Done: Tested ifdown of an interface and make sure the addresses
are deleted

cache_invalidate can be called when an interface gets deleted
or on any other deletion event (this is because we dont really
know, what other things have been implicitly deleted by the kernel).
on ifdown, the cache can get invalidated. But if we dont
reset the cache flag, the fill cache functions can still think
the cache is valid and can return None for any queries.
This was happening to address queries, which resulted in
leaving behind configured addresses. because ifdown
thought that there were no running addresses on the interface.
2016-04-06 08:19:10 -07:00
Nikhil
bafcc12d84 addons: vrf: ifquery fixes for vrf
Ticket: CM-10175
Reviewed By: Roopa Prabhu
Testing Done: yes, by installing ifupdown .deb onto dell-s3000-02

This patch is a git revert of commit 934c4c49c0e77289e7d56349c44d14ca2c307621.
In addition to that, order of _addr_filter() function call arguments are
changed to match the function definition.

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-04-04 02:20:44 -07:00
Nikhil
586535e8db addons: vrf: ifquery fixes for vrf
Ticket: CM-10175
Reviewed By: Roopa Prabhu
Testing Done: yes, by installing ifupdown .deb onto dell-s3000-02

This patch fixes inappropriate ifquery fails.
This patch also include a review comment update for addressvirtual.py
[CCR-4310], ticket: [CM-8658]
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-04-04 02:20:44 -07:00
Roopa Prabhu
d49a18d1b9 ifupdownaddons: iproute2: add optional refresh flag to addr get api
Ticket:
Reviewed By: trivial
Testing Done: tested address gets with refresh flag + ran ssim test testifupdown2.py

- also fixes refresh flag handling in cache _addr_fill function
- this api can be used to get addresses from the cache by first
refreshing the cache. So the caller gets fresh running addresses.
(its not used right now but came up during the need to re-apply
addresses for ipv6 vrf slaves since their addresses may disappear)
2016-04-03 19:20:44 -07:00
Nikhil
050838834b Revert "addons: vrf: ifquery fixes for vrf"
This reverts commit 934c4c49c0e77289e7d56349c44d14ca2c307621.

    Ticket: CM-10175
    Reviewed By: Roopa Prabhu
    Testing Done: yes, by installing ifupdown .deb file onto dell-s3000-02

default addr fix for vrf check is deleting lo addrs accidentally
info: rtnetlink: setting link lo up
info: executing ip addr del ::1/128 dev lo
info: executing ip addr del 127.0.0.1/8 dev lo
info: eth0: running ops ...

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-04-01 21:33:16 -07:00
Roopa Prabhu
05ac52f075 addons: vrf: redo iproute2 vrf interface map handling
Ticket: CM-10188, CM-10061
Reviewed By: dsa, nikhil, julien
Testing Done: Tested static routes with vrf names for tables

This patch does the following:
- if a single vrf device is present in the config,
builds the vrf map by reading vrf interfaces from the kernel (with
existing link cache. Builds a shadow vrf only attribute cache)
- reads existing table map and adjusts it if required
- main change is the iproute2 map file on disk is updated
immediately on vrf creation, so that static routes used along with the
vrf slaves can use the vrf name for the table. This also helps dhclient dns
hook script which may use mgmt table name directly.
- cleans up default routes on down

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-03-31 21:56:39 -07:00
Nikhil
934c4c49c0 addons: vrf: ifquery fixes for vrf
Ticket: CM-10175
Reviewed By: Roopa Prabhu
Testing Done: yes, by installing ifupdown .deb onto dell-s3000-02

This patch fixes inappropriate ifquery fails.
This patch also include a review comment update for addressvirtual.py
[CCR-4310], ticket: [CM-8658]
Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-03-30 19:13:58 -07:00
Roopa Prabhu
122ef35bf9 addons: vrf: release any dhcp leases before vrf slave enslavement
Ticket: CM-9929
Reviewed By:
Testing Done: Tested vrf dhcp slave enslavement on ifreload

algo:
- when a vrf slave enslavement changes, before performing the
  new master enslavement,
- check if vrf slave has dhcp configured
- if yes, release dhclient running on the vrf slave
2016-03-17 16:18:14 -07:00
Roopa Prabhu
b3745e05ed modulebase: add ifaceobj.set_status calls in log_error and log_warn
Ticket:
Reviewed By: trivial
Testing Done:

This can be used by callers to set iface object status.
2016-03-10 11:10:50 -08:00
Roopa Prabhu
1553a88121 addons: bond: replace bond-ad-sys-priority and bond-ad-sys-mac-addr with equivalent upstream attributes
Ticket: CM-9677
Reviewed By: nikhil
Testing Done: Tested with bond config file in CM-9677

This patch replaces the following attributes:
bond-ad-sys-priority with bond-ad-actor-sys-prio
bond-ad-sys-mac-addr with bond-ad-actor-system

The new attributes correspond to the new sysfs files below:
/sys/class/net/sidelink/bonding/ad_actor_sys_prio
/sys/class/net/sidelink/bonding/ad_actor_system

Old values will be accepted with a deprecated warning:
warning: attribute bond-ad-sys-priority is deprecated. Use bond-ad-actor-sys-prio instead
warning: attribute bond-ad-sys-mac-addr is deprecated. Use bond-ad-actor-system instead
2016-03-03 16:44:33 -08:00
Nikhil
659097a03b ifupdownaddons: iproute2: Fix for error while enslaving 'eth0' to a vrf
Ticket: CM-9594
Reviewed By: Roopa Prabhu
Testing Done: Yes, by installing ifupdown2 deb onto cel-e1031-01

This patch fixes the failure to execute the command
'ip link set dev eth0 nomaster' when 'eth0' is associated with any vrf

This patch also include a review comment update for CCR-4210
2016-03-02 10:32:45 -08:00
Roopa Prabhu
2b5894580b ifupdownaddons: fix parsing of vlan attributes
Ticket: CM-8729
Reviewed By: trivial
Testing Done: Tested with a config with vlan-raw-device

'ip -o -d link show' introduced a new attribute between
'vlan and id'. This makes the move to json or netlink
even more necessary.

The fixes were done for the following format:
61: vlan100@swp1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UP mode DEFAULT group default \    link/ether
00:e0:ec:27:4e:b7 brd ff:ff:ff:ff:ff:ff promiscuity 0 \    vlan protocol
802.1Q id 100 <REORDER_HDR> addrgenmode eui64
2016-03-01 22:55:16 -08:00
Roopa Prabhu
15bb78054f mstpctlutil: fix strip on NoneType warning
saw this during execution of the below command:
ifup --no-act -a

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-02-26 15:43:02 -08:00
Roopa Prabhu
768b4ec52f vrf: handle slaves when vrf device is brought up
The vrf device may not be up when ifup is executed on the
slaves. This commit makes sure:
- vrf slaves dont try to enslave themselves when vrf device is
not present
- And vrf master enslaves any missing slaves during ifup of vrf master
- Also make vrf device the link master, this will make sure
the vrf device brings the vrf slave links up. This is needed to work
around the ipv6 address flush issue

Closes: CM-9493
Review: dsa, nikhil, wkok (via git send-mail)
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-02-26 15:42:42 -08:00
Wilson Kok
7b2469dbf3 Removed lacp bypass priority mode
Ticket: CM-9494
Reviewed By: CCR-4184
Testing Done:

Also removed legacy 'fallback' options.
Now lacp bypass is enabled and disabled on a bond with:

    bond-lacp-bypass-allow [0|1]
2016-02-26 07:32:01 -08:00
Balakrishnan Raman
c07383d142 service node address config for vxlan device using "remote" attribute
Ticket: CM-9520
Reviewed By: CCR-4152
Testing Done: verified service node configuration

Use "remote" attribute in iproute2 command to provision
service node address for service node based replication. Changes also
include allowing only one service node per vxlan device, so its user's
responsiblity to select one service node per vxlan device if there
are multiple nodes to distribute the load.
2016-02-25 22:03:06 -08:00
Nikhil
54616d3f51 addons: vrf: support for vrf-default-route attribute
Ticket:CM-9106
Reviewed By: Roopa Prabhu and Dave Olson
Testing Done: Yes, by installing ifupdown and cumulus-tools deb on to cel-e1031-01

This patch adds per vrf default route: "ip route add table <tbid> unreachable default"

It also accepts a policy file with vrf-default-route [yes/no]

This also includes ifquery fixes for running and check.
2016-02-23 16:02:31 -08:00
Wilson Kok
5d0f83e36e Set vlan-filtering on bridge before adding bridge ports
Ticket: CM-6806
Reviewed By: CCR-4126
Testing Done:

Currently, when doing ifup of a bridge, the bridge is created
and ports are added to bridge before vlan_filtering is set on
the bridge. This causes extra churn on switchd which has to
configure the hardware one way and then tear it down and
reconfigure it again in the new way. For mlx, it causes even
more problems.

This patch moves the vlan_filtering setting of bridge to before
member ports are being added to the bridge, and it uses the new
iproute2 command for setting the attribute instead of through
sysfs.
2016-02-19 14:17:16 -08:00
Roopa Prabhu
5e01fb8056 ifupdownaddons: iproute2: support for vrf linkinfo
Closes: CM-8518
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Acked-by: Nikhil Gajendrakumar <nikhil@cumulusnetworks.com>
2016-02-19 13:47:29 -08:00
Sam Tannous
6c5e92aa70 ifquery running not showing vlan ranges in 3.0
Ticket: CM-9097
Reviewed By: Trivial
Testing Done: Tested on Chris' config

In 3.0, the bridge vlan show command does not print
VLAN ranges unless you use the "-c" option.
This patch modifies the bridge vlan show call in
iproute2.py to use "-c".
2016-02-18 16:49:40 -05:00
wkok
bb22d4d339 Modified lacp-bypass-all-active support to use the new sysfs
node /sys/class/net/bondx/bonding/lacp_bypass.

Ticket: CM-9266
Reviewed-by: trivial
Testing-done:
2016-02-12 10:19:38 -08:00
Scott Emery
969aac98f7 ifupdown2: After loading bonding driver, continue to create bond
Ticket: CM-9182
Reviewed By: Trivial
Testing Done: ifup'd bond when bonding module was not yet loaded.

The bond support in ifupdown2 would check to see if the bonding module is
loaded when creating a bond. If it was not it would load the driver and return.
The correct operation is to load the driver and then continue to create the
bond.
2016-02-08 12:48:37 -08:00
Anuradha Karuppiah
e7cd7b3bf1 Cleanup clag enable references.
Ticket: CM-9078
Reviewed By: Trivial
Testing Done: bond ifdown/ifup on s6000

This needs to be replaced with protodown of clag bond slaves
pre-enslave (TBD; coming soon).
2016-02-05 16:01:59 -08:00
Scott Emery
a0a8d7e094 ifupdown2: Modify implementation of nowait option
Ticket: None
Reviewed By: CCR-4058
Testing Done: ifup'd interface with both dhcp-wait: "no" and dhcp-wait: "yes"
and not specified at all.

A previous patch implemented the nowait option for DHCP. This patch changes the
name of the option to "dhcp-wait" and makes the default, if nothing is specified
in the policy files, to be "yes", which means dhclient will be called without
the "-nw" option, causing it to wait for up to a minute for a response from the
DHCP server before continuing.

The format of the JSON in the policy file for this option was also changed so
that it conforms to the other ifupdown2 policy options. This format is now:

{
    "dhcp": {
        "defaults": { "dhcp-wait": "no" }
    }
}

Also, the documented argument values are "yes" and "no". Any other values, will
be interpreted as "yes".

A subsequent patch in cl-basefiles will be made to include this fragment in
/var/lib/ifupdown2/policy.d/dhcp.json so that Cumulus Linux will default to
not waiting for DHCP to complete.
2016-02-03 16:38:18 -08:00
Scott Emery
6d359159c3 ifupdown2: Add nowait attribute for dhcp addon
Ticket: None
Reviewed By: CCR-4058
Testing Done: ifup'd interface with both nowait=0 and nowait=1 and not specified
at all.

The Mellanox platform, as well as some others probably, has two management
interfaces: eth0 and eth1. The customer may plug a cable into either one of
these interfaces, and very rarely both of them. If only one cable is plugged in
and we don't know which one, then /etc/network/interfaces must be configured
by default to automatically bring up both interfaces using DHCP. But when an
interface does not have link, it stalls the boot process for 60 seconds while
dhclient times out.

This patch changes the default dhclient behavior to not wait for DHCP to
complete, by using the "-nw" option when calling dhclient. This means that
dhclient will immediately return and DHCP will complete in the background.

A module attribute has been added for the DHCP addon called "nowait", which
defaults to 1. If this attribute is set to 0, then dhclient will revert to its
previous behavior and delay up to a minute while DHCP completes. This attribute
can be specified in a policy file, e.g. /etc/network/ifupdown2/policy.d/dhcp.json,
with contents such as:

{
  "dhcp" :
  {
    "nowait" : 0
  }
}
2016-02-01 16:42:28 -08:00
Roopa Prabhu
8465de9077 addons: support for new addon module for vrf
This patch adds initial support for vrf in ifupdown2.

Example interfaces file section:
auto swp1.100
iface swp1.100
    vrf blue

auto blue
iface blue
    vrf-table 10

iproute2 vrf map is generated under:
/etc/iproute2/rt_tables.d/ifupdown2.vrf_map

this patch also adds prelimnary support for 'vrf-table auto'.
But this needs more work.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-01-28 22:01:59 -08:00
Roopa Prabhu
9a8ad21aab ifupdown2: modulebase: fix parse_glob arguments
Ticket: CM-8413
Reviewed By: trivial
Testing Done: Tested failing glob expression in the bug report

Fixes bcca6f753a25 ("ifupdown2: fix a few regex parsing error messages")

(cherry picked from commit 997b0438104bacf12e2db6bdc29c7ea1fec4d91b)
2015-12-09 14:02:54 -05:00
Sam Tannous
b97687bc96 ifupdown not restoring mstpctl attributes (e.g. bpdufilter, bpduguard) in mstpctl
Ticket: CM-7756
Reviewed By: roopa
Testing Done: built powerpc and tested ifupdown2 as well as new tests

Once mstpctl-portbpdufilter or mstpctl-bpduguard is enabled for
an interface, removing the configuration in /etc/network/interfaces
does not toggle the mstpctl state back to no.

The root cause of this problem is that "ifreload" does not check default settings for MSTP configuration
for bridge ports and use a default when that setting is removed from the configuration.

This patch adds a check in the existing loop on attribute values.
If there is no configured value, we check to see if a default exists.
self._modinfo['attrs'][attrname]['default'] exists.
If it exists and it is different then the currently running value
we reset the attribute to its default. This is what a customer would expect if
they removed a configured value.

(also added test in cl-tests to check this functionality)

(cherry picked from commit 63d0f7082d44fedabe002aebbb658751dc655a46)
2015-12-09 14:02:29 -05:00
Roopa Prabhu
5f8c03e7a1 ifupdown2: mstpctl: check mstpd running just once during init of mstpctl modules
Ticket: CM-8035
Reviewed By: wkok
Testing Done: Tested mstp commands in interfaces file

(cherry picked from commit 2c3471f2082c8adbdcc395cbd0066680f280b9e5)
2015-12-09 14:02:07 -05:00
Roopa Prabhu
200453838b ifupdown2: clagd: check clag service restart status and print warning if
not running

Ticket: CM-8211
Reviewed By: CCR-3876
Testing Done: Tested clagd parameters change from ifupdown2

$ifquery bond10.4094
auto bond10.4094
iface bond10.4094
    address 169.254.0.27/24
    clagd-peer-ip 169.254.0.28
    clagd-sys-mac 44:38:39:ff:40:94
    clagd-backup-ip 172.27.28.1
    clagd-priority 4096
    clagd-args --peerTimeout 4o

$ifup -v  bond10.4094
info: Executing /usr/sbin/service clagd restart
info: executing /usr/sbin/service clagd status
[FAIL] clagd is not running ... failed!
warning: bond10.4094: clagd failed to start..Please check clagd log for
details

$tail -f /var/log/clagd.log
2015-11-25T22:14:44.014582+00:00 cel-redxp-06 clagd[30875]: Invoked
with: /usr/sbin/clagd --daemon 169.254.0.28 bond10.4094
44:38:39:ff:40:94 --priority 4096 --backupIp 172.27.28.1 --peerTimeout
4o
2015-11-25T22:14:44.020579+00:00 cel-redxp-06 clagd[30875]: There was an
error in the command line parameters.
2015-11-25T22:14:44.020609+00:00 cel-redxp-06 clagd[30875]: argument
--peerTimeout/-t: invalid int value: '4o'
2015-11-25T22:14:44.020618+00:00 cel-redxp-06 clagd[30875]: exit with
status -1

(cherry picked from commit ac4f4a129a9125eeaf17a48a200ad8ac44bf7ef6)

Conflicts:
	packages/clag/ifupdown/clagd.py
2015-12-09 14:00:58 -05:00
Roopa Prabhu
0c8332bc5e ifupdown2: fix a few regex parsing error messages
Ticket:
Reviewed By: CCR-3804
Testing Done: Tested regex parsing failures

This is mostly a cosmetic fix. we were failing with weird/unclear errors
on unable to parse regex expressions correctly.
This patch mainly adds the interface name to the message and plus adds
an info message showing the actual regex being used in searches.

example config:
{noformat}
auto br-roopa
iface br-roopa
  bridge-vlan-aware yes
  bridge-ports regex '(\\Aswp3\\Z|\\Aswp4\\Z)'
  bridge-pvid 20
{noformat}

before the patch:
warning: br-roopa: error getting dependent interfaces (unbalanced
parenthesis)

after the patch (not pretty but easier to debug)

info: br-roopa: evaluating port expr '['regex', "'(", 'Aswp3', 'Z|',
'Aswp4', "Z)'"]'
warning: br-roopa: error getting dependent interfaces (br-roopa: error
searching regex ''(' in swp38 (unbalanced parenthesis))

(cherry picked from commit bcca6f753a25494666d53f1f2f3c855ffa41d7f0)
2015-12-09 13:53:07 -05:00
Roopa Prabhu
b4ea30ca2c Fix batch_commit to reset vars if batch buffer is NULL.
Ticket: CM-6982
Reviewed By: trivial but imp
Testing Done:

This will make sure a stale batch.start() with no real batch commands
is ended cleanly.
2015-09-17 11:26:38 -07:00
Wilson Kok
dae9c5dee0 ifupdown: vxlan-remoteip not getting applied when vxrd is not configured to run
Ticket: CM-7410
Reviewed By: CCR-3470
Testing Done:

When vxrd is not enabled in /etc/default/vxrd, the 'service vxrd status'
command returns 0, causing the vxlan-remoteip to be not applied even
though it should have. Fix is to change to checking pidfile of vxrd.
2015-09-10 14:00:53 -07:00
Balakrishnan Raman
a794fb3142 ifupdown2 changes for vxlan anycast_ip, head-end fdb entries, protodown
Ticket: CM-7087
Reviewed By: CCR-3379
Testing Done: unit testing with clag_vxlan_clos_spec/cfg.py

On clag pairing, clagd changes local address of vxlan device to anycast ip.
If user does ifreload now, ifupdown2 will overwrite local address with
individual ip contained in /etc/netwrok/interfaces. vxlan.py caches
anycast_ip configuration so that ifquery -c can skip it from flagging error
and ifreload skip overwriting vxlan device's local ip.

vxrd provisions head-end replication endpoints by adding bridge fdb entries.
If /etc/network/interfaces doesn't have remote-ip attribute, then on ifreload
ifupdown2 will delete all vxrd provisioned entries. ifupdown will check for
presence of vxrd service and skip add/delete bridge fdb entries for
head-end replication

On ifreload vxlan device are put in proto-down even if they are up and running.
Check for operstate and put it in proto-down only if operstate transitions from
down to up.
2015-09-04 00:38:47 -07:00
Roopa Prabhu
2ec2da0cf9 new ifupdown2 link module to create dummy devices
Ticket: CM-3525
Reviewed By: CCR-3326
Testing Done: Tested creating dummy devices using ifupdown2

This is modification to gospos loopback module. It solves the same
purpose ie using linux dummy device like a loopback device but there were
objections on calling it loopback so i have renamed it to link and i have changed it
into a generic module that can do any 'ip link'. Can be extended for
link args in the future.

below example creates a loopy device

$ifquery loopy
auto loopy
iface loopy
link-type dummy

$ifup loopy
$ifquery -c loopy
auto loopy
iface loopy [pass]
link-type dummy [pass]

(cherry picked from commit 1151420408a53c106d29183a1e0da5562c8b03a3)
2015-08-29 07:02:50 -07:00
Wilson Kok
b37ec99a0c ifupdown: fixed warning when apply lacp attributes to non lacp bonds
Ticket: CM-6161
Reviewed By: Roopa
Testing Done:

Check bond mode when applying lacp attributes.
2015-08-10 14:19:09 -07:00
Roopa Prabhu
4994b48f42 change /bin/bridge path to /sbin/bridge to be same as upstream
Ticket: CM-6519
Reviewed By:
Testing Done: sanity test
2015-08-08 23:14:55 -07:00
Balakrishnan Raman
27f2a937d8 ifupdown2 fixes for svcnode, vxlan-ageing, bridge-vlan-aware
Ticket: CM-6815, CM-6816, CM-6817
Reviewed By: CCR-3234
Testing Done: unit testing

CM-6815 : ip link set syntax for svcnode has been changed. Absence of svcnode
will retain the existing values. svcnode 0.0.0.0 is needed to wipe out service
node addresses in vxlan device. Modified ifupdown2 to use svcnode 0.0.0.0 to
clean up service node address.

CM-6816: "bridge-clan-aware no" is not handled in query-check and hence ifquery
on bridge interface with "bridge-vlan-aware no" fails. Modified bridge's
query-check to take care of this.

CM-6817: With default ageing value (300), if query -c <vxlan device> was
failing. Set ageing to 300 if not specified and compare it with running config.
2015-07-23 12:17:47 -07:00
Sam Tannous
6cb589dfdf Allow customer set bond defaults for CL with ifupdown2
Ticket: CM-6723
Reviewed By: roopa
Testing Done: unit tested and testifupdown2 test suite

This patch installs bond interface defaults in

     /etc/network/ifupdown2/policy.d/bond_defaults.json

and allows users to modify this file.   Users can then leave out these
bond attributes in their configs to save typing and space.

It also changes the ifenslave and ifenslaveutil module to bond and
bondutil, respectively to be consistent with other modules
(and also because customers think of "bond" interfaces not
"ifenslave" interfaces.)

For example, the default file installed looks like the following:

{
    "README": "This file is user generated and modifiable.",
    "bond": {
        "defaults": {
                "bond-mode": "802.3ad",
                "bond-miimon": "100",
                "bond-use-carrier": "1",
                "bond-lacp-rate": "0",
                "bond-min-links": "1",
                "bond-xmic-hash-policy": "layer3+4"
         }
    }
}
Please enter the commit message for your changes. Lines starting
2015-07-22 18:38:07 -04:00
Roopa Prabhu
c78cae3d24 Fix ip addr parsing breakage on sid
Ticket:
Reviewed By: stannous
Testing Done: sanity testing
2015-07-13 14:33:01 -07:00
Roopa Prabhu
d005639cac Fix warning (was emitting two lines)
Ticket:
Reviewed By: trivial
Testing Done:
2015-07-01 15:01:15 -07:00
Sam Tannous
139662ee08 Enhance globbing in ifupdown2 to support breakout cables
Ticket: CM-5365
Reviewed By: roopa,dwalton
Testing Done: Ran regression suite and hand tested.

This patch extends the globbing support in ifupdown2
to handle two levels of square brackets so that breakout
cables can be handled (e.g. swp[2-7]s[0-3]).  Also modified
the user's guide and the man pages.
2015-06-16 20:58:15 -04:00
Sam Tannous
76cb1a631e vxlan error 'str' object has no attribute 'append'
Ticket: CM-6329
Reviewed By: roopa
Testing Done: unit testing with vxlan configs

A bug iproute2.py creates an unnecessary warning
about appending the ageing value to a string.
This patch removes the append and simply sets the ageing value.
2015-06-16 17:15:57 -04:00
Sam Tannous
88a5c4c89d Added ifupdown2 support for vxlan-ageing config
Ticket: CM-5105
Reviewed By: roopa
Testing Done: tested configs before and after change

We needed a configuration option to add vxlan-ageing to
ifupdown2 configs.  This patch adds the option to change
the vxlan-ageing timer currently set with "ip link"
commands.
(cherry picked from commit 9832462c365bd2b900b98f5675d407d1b11c4a95)

Conflicts:
	packages/ifupdown2/addons/vxlan.py
	packages/ifupdown2/ifupdownaddons/iproute2.py
2015-06-04 15:27:01 -04:00
Wilson Kok
137de5d7dc LACP bypass fixes
Ticket: CM-5924, CM-5937, CM-5921, CM-5932
Reviewed By: CCR-2911
Testing Done:

bonding driver:
- renamed bond lacp-bypass-use-priority config option to
  lacp-bypass-all-active with the default value of 0
- ignore clag role when lacp-bypass-all-active is enabled
- added info logging of lacp bypass state changes

iproute2:
- renamed bond lacp-bypass-use-priority config option

ifupdown:
- renamed bond lacp-bypass-use-priority config option
- added default value handling for lacp bypass attributes

switchd:
- macs learned on individual slaves are now sync to kernel with
  the bond's ifindex.  This eliminates flooding when cpu is
  communicating to the host where the bond is in lacp bypass
- fixed bond forwarding state propagation to individual slaves in
  bypass
2015-05-08 11:38:41 -07:00
Wilson Kok
48db65f6e9 Added ifupdown support for different lacp bypass modes
Ticket: CM-5716
Reviewed By:
Testing Done:

Added mode to distinguish between priority based and multiple links
lacp bypass modes.
2015-05-02 15:19:51 -07:00
Wilson Kok
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
Roopa Prabhu
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