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

769 Commits

Author SHA1 Message Date
Julien Fortin
b6b8bd2b77 addons may provide a list of ifupdown scripts to ignore
Ticket:
Reviewed By: Roopa, Nikhil G
Testing Done:

ifupdown2's python addons are replacing some/most of the old ifupdown shell
scripts. When addon_scripts_support is set to 1, ifupdown2 will execute every
scripts present in /etc/network/if-$ACTION.d/ if a script exists with a name
identical to an ifupdown2 addon, this script won't be executed.

Sometimes an ifupdown2 addons doesn't have the same name as the ifupdown script
it's supposed to replace. Or maybe one addon is replacing several scripts.
For example: bond.py is replacing /etc/network/if-*.d/ifenslave

Now each addon is able to provide a list of script to ignore.

[16:54:40] root:ifupdown2 # ifquery bond0
iface bond0
      bond-slaves tap0 tap1

[16:54:49] root:ifupdown2 # ifreload -a -d &> /tmp/ifreload.log
[16:54:54] root:ifupdown2 # cat /tmp/ifreload.log | grep ifenslave
debug: tap1: pre-up : running script /etc/network/if-pre-up.d/ifenslave
info: executing /etc/network/if-pre-up.d/ifenslave
debug: tap1: up : running script /etc/network/if-up.d/ifenslave
info: executing /etc/network/if-up.d/ifenslave
debug: lo: pre-up : running script /etc/network/if-pre-up.d/ifenslave
info: executing /etc/network/if-pre-up.d/ifenslave
debug: lo: up : running script /etc/network/if-up.d/ifenslave
info: executing /etc/network/if-up.d/ifenslave
debug: eth0: pre-up : running script /etc/network/if-pre-up.d/ifenslave
info: executing /etc/network/if-pre-up.d/ifenslave
debug: eth0: up : running script /etc/network/if-up.d/ifenslave
info: executing /etc/network/if-up.d/ifenslave
debug: tap0: pre-up : running script /etc/network/if-pre-up.d/ifenslave
info: executing /etc/network/if-pre-up.d/ifenslave
debug: tap0: up : running script /etc/network/if-up.d/ifenslave
info: executing /etc/network/if-up.d/ifenslave
[16:54:55] root:ifupdown2 #
...
apply patch
...
[16:55:16] root:ifupdown2 # ifreload -a -d &> /tmp/ifreload.log
[16:55:18] root:ifupdown2 # cat /tmp/ifreload.log | grep ifenslave
[16:55:19] root:ifupdown2 #

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-09-27 11:05:37 +02:00
Julien Fortin
8252491ed0 addons: mstpctl: warning user when using portadminedge attr on bridge vlan aware
Ticket: CM-12478
Reviewed By: Roopa, Nikhil G

Roopa: "For vlan aware bridge, we don't support the port attributes under the
bridge. It was deliberately done when vlan aware bridge config was introduced
because people wanted to get rid of the legacy under the bridge way of decla-
-ring port attributes. It was supported for a bit for evorack...in limited
 form. we should probably just warn the user about this."

auto br100
iface br100
      bridge_ports swp3 swp4 swp5
      mstpctl-portadminedge swp3=yes swp4=yes swp5=yes
      bridge-vlan-aware yes

$ ifreload -a -s
warning: br100: unsupported use of keyword 'mstpctl-portadminedge' when bridge-vlan-aware is on
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-09-26 15:59:43 +02:00
Julien Fortin
378c6c2681 ifupdownmain: sending ifaceobj to syntax_check method
Ticket: None
Reviewed By: Roopa, Nikhil G

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-09-26 10:37:33 +02:00
Roopa Prabhu
3fb52fa360 ifupdown: scheduler: ignore errors generated by upperiface bring up
Ticket: CM-12923
Reviewed By: julien, nikhil
Testing Done: tested implicit upperiface bring up

upperiface bringup is best effort, so ignore errors.

$ifquery -c -a
..[snip]...
auto br0
iface br0
        bridge-vlan-aware yes                        [pass]
        bridge-ports vx-14 vx-11 vx-10 vx-13 vx-12   [pass]

$ifdown vx-10
$ifdown vx-11

before patch:
$ifup vx-10
..[snip]...
info: running upperifaces (parent interfaces) if available ..
info: br0: running ops ...
error: br0: bridge port vx-11 does not exist
....

After patch:
$ifup vx-10
..[snip]...
info: running upperifaces (parent interfaces) if available ..
info: br0: running ops ...
....

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-09-22 13:54:16 -07:00
Julien Fortin
cd45e62956 addons: usercmds: add environment variables passed to user scripts
Ticket: github issue #14
Reviewed By: Roopa, Nikhil G
Testing Done:

$ cat /etc/network/interfaces
auto eth0
iface eth0 inet dhcp
      up /root/test.sh
$
$ cat /root/test.sh
echo 'IFACE=' $IFACE
echo 'LOGICAL=' $LOGICAL
echo 'METHOD=' $METHOD
echo 'ADDRFAM=' $ADDRFAM
$
$ ifreload -a
IFACE= eth0
LOGICAL= eth0
METHOD= dhcp
ADDRFAM= inet
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-09-20 09:16:57 -07:00
Roopa Prabhu
81765e715e debian: changelog: fixup last released and unreleased versions
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-09-19 16:38:55 -07:00
Roopa Prabhu
6fa9b969ad Merge branch 'staging3.1.1' into dev 2016-09-16 12:41:06 -07:00
Marek Grzybowski
1f5db4a862 fix for passing parameters to templateEngine() class
Signed-off-by: Marek Grzybowski <marek.grzybowski@rtbhouse.com>
2016-09-16 12:39:51 -07:00
Roopa Prabhu
1a6bda12ed ifupdownmain: dont catch link_up and link_down errors in ifupdownmain
Ticket: CM-12843
Reviewed By: julien, nikhil
Testing Done: Tested the failing test case in the bug

The scheduler already has some checking for errors from
link_up and link_down introduced by
commit 61c4d7244735 ("Suppress 'Network down' warnings when
link_master_slave feature is on").

The above fix was removed by a recent commit
707aeb737882 ("netlink ip link set up/down may silently fail, adding
try/except statements"). The scheduler does catch these errors.
so we will need to figure out why the scheduler is not catching it.
Right now this is failing an automation test. So the best fix
is to make sure the previous behaviour is restored.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-09-16 11:29:27 -07:00
Roopa Prabhu
6fbd7444db addons: vrf: close sockets when vrf interface goes down
Ticket: CM-11393
Reviewed By: dsa, julien, nikhil
Testing Done: tested up and down of a vrf interface

$ifdown -v blue
..snip ..
info: executing /usr/lib/vrf/vrf-helper delete blue 1030
info: executing ip link del blue
info: executing /bin/ss -aK "dev == 54"
info: vrf: syncing table map to
/etc/iproute2/rt_tables.d/ifupdown2_vrf_map.conf

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-09-15 10:51:49 -07:00
Roopa Prabhu
dc3f4c4507 addons: addressvirtual: fix handling of admin state of macvlan interfaces
Ticket: CM-12823
Reviewed By: julien, nikhil
Testing Done: Tested addressvirtual config with vrfs (as described in
the bug)

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-09-15 08:10:32 -07:00
Julien Fortin
0493bac6cb addons: addressvirtual: adjusting macvlan mtu based on the lower device
Ticket: CM-11214
Reviewed By: Roopa
Testing Done:

Previously we were adjusting the macvlan mtu based on the wrong device.
We used to do, using the config example bellow:

get_mtu(ifaceobj.lowerifaces[0])
get_mtu("bridge")

instead of doing get_mtu(bridge.20)

$ cat /etc/network/interfaces
auto tap0
iface tap0
      #mtu 9000
      mtu 1500

auto bridge
iface bridge
      bridge-ports tap0

auto bridge.20
iface bridge.20
      address 10.7.192.194/27
      address-virtual 44:38:39:ff:00:20 10.7.192.193
$ ifreload -a
$ ip link show
bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
bridge.20@bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
bridge-20-v0@bridge.20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
$ #change mtu to 9000
$ ifreload -a
$ ip link show
bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default
bridge.20@bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default
bridge-20-v0@bridge.20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-09-14 17:15:36 -07:00
Julien Fortin
82908a2d73 normalizing ip address(s) to IPNetwork format for string comparaison
Ticket: CM-12798
Reviewed By: Roopa, Nikhil G
Testing Done:

We are seeing some issue when using IP addresses with inner values padded with
zeros. Such as: 2a01:75e0:0000:09b0::1/64
The kernel will process the ip properly but when we query the kernel again (with
iproute2 or netlink) it returns 2a01:75e0:0:09b0::1/64

Since we are doing string comparaison we are seeing failures. We are now
converting all ip address to a standard format using IPNetwork or IPAddress obj

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-09-14 16:00:25 -07:00
Julien Fortin
df4327e9ca Merge remote-tracking branch 'origin/staging3.1.1' into dev 2016-09-13 17:11:38 -07:00
Julien Fortin
0309264919 addons: address: ignoring iproute2 'rtnetlink file exists' errors
Ticket: CM-12798
Reviewed By: Roopa
Testing Done:

A customer discovered a corner case: the kernel is shrinking/reducing the ip
address fields containing 0s. For example if we configure and address such as
2a01:75e0:0000:09b0::1/64

Then if we query the kernel (using iproute2 or netlink) it will come back as:
2a01:75e0:0:09b0::1/64

Because of this issue we were seeing
root@r4u28:~# ifreload -a
error: bridge.200: cmd 'ip -force -batch - [addr add 10.50.103.193/26 dev bridge.200
addr add 2a01:75e0:0000:09b1::1/64 dev bridge.200
]' failed: returned 1 (RTNETLINK answers: File exists
Command failed -:1
)

Before adding an address to an iface we query it to know if the change is
necessary, since we only do a string comparaison between:
2a01:75e0:0000:09b1::1/64 and 2a01:75e0:0:09b1::1/64

it fails, ifupdown2 thinks that a change is needed. So we try to add the new
address via iproute2. iproute2 will fail because this address in a "shrinked"
format already exists.

This patch hot-fixes this problem by ignoring the error if it's an "exists"
error, we don't want to confuse the user.
A later fix will the real issue by normalizing all ip addr to the IPNetwork
format.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-09-13 17:03:24 -07:00
Julien Fortin
abbf513ef4 ifupdown: netlink: removing log message when retrieving ifindex
Ticket: None
Reviewed By: Roopa

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-09-13 11:27:14 -07:00
Julien Fortin
346a0d6833 debian: fixing lintian warnings/errors
Ticket:
Reviewed By: Roopa
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-09-09 12:30:50 -07:00
Daniel Walton
1bb990bd98 3.2 - nclu - net add bridge alias not taking text in quotes
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   roopa@cumulusnetworks.com

Ticket: CM-12764
2016-09-07 19:13:58 +00:00
Daniel Walton
2ed2adeb6e 3.2 - nclu - adding v6 gateway followed by v4 - v6 is lost
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   roopa@cumulusnetworks.com

Ticket: CM-12725
2016-09-07 16:57:55 +00:00
Roopa Prabhu
89a0bc6512 Merge branch 'eadev' into dev
Conflicts:
	addons/address.py
	addons/bridge.py
	nlmanager/nlmanager.py
2016-09-02 16:06:58 -07:00
Roopa Prabhu
6f5b74f7cc addons: vrf: be more friendly to older iproute2 versions
Ticket: CM-12049
Reviewed By: dsa, julien, nikhil
Testing Done: tested with and without /etc/iproute2/rt_tables.d/

OS does not have /etc/iproute2/rt_tables.d, on errors just info:
$ifreload -a -v
info: unable to save iproute2 vrf to table map ([Errno 2] No such file
or directory: '/etc/iproute2/rt_tables.d/ifupdown2_vrf_map.conf')

info: cannot find /etc/iproute2/rt_tables.d. pls check if your iproute2
version supports rt_tables.d

OS has /etc/iproute2/rt_tables.d, on errors warn:
$ifreload -a
warn: unable to save iproute2 vrf to table map ([Errno 2] No such file

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-09-02 15:10:24 -07:00
Roopa Prabhu
29d834f6a8 addons: bridge: protect all vids to int calls under try/except
Ticket: CM-12716
Reviewed By: julien, nikhil
Testing Done: tested with non-int vids and pvid

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-09-02 12:35:05 -07:00
Julien Fortin
19c9569911 nlmanager: fixing error messages when receiving NLMSG_ERROR
Ticket: CM-12596
Reviewed By: Roopa, Daniel W
Testing Done:

before this patch:

$ cat /etc/network/interfaces
auto tapppppppppppp0.42
iface tapppppppppppp0.42
$
$ ifreload -a
warning: /etc/network/interfaces: line8: tapppppppppppp0.42: interface name too long
error: netlink: tapppppppppppp0: cannot create vlan 42: Operation failed with 'None' (RXed  NLMSG_ERROR, pid 3346, seq 6, 108 bytes)
$

after:

$ ifreload -a
warning: /etc/network/interfaces: line8: tapppppppppppp0.42: interface name too long
error: netlink: tapppppppppppp0: cannot create vlan 42: Operation failed with 'Numerical result out of range'
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-25 14:57:21 -07:00
Julien Fortin
26d1e82b2f nlmanager: support for bridge vlan and show commands
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   julien@cumulusnetworks.com

Ticket: CM-12199

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-25 14:39:36 -07:00
Julien Fortin
707aeb7378 netlink ip link set up/down may silently fail, adding try/except statements
Ticket: CM-12609
Reviewed By: Roopa, Nikhil G
Testing Done: ifupdown2 smoke tests

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-24 14:20:45 -07:00
Nikhil
781b55c5b0 addons: bridge: remove pvid from vids list on ifquery -r for bridge port
Ticket: CM-12494
Reviewed By: roopa, julien
Testing Done: used config mentioned in bug

'ifquery -r' on a specific bridge port was not removing
pvid from the list of vids.
This patch does that.

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-08-24 10:19:55 -07:00
Julien Fortin
cb80e1d386 nlmanager: changing log level (info->debug) for TXed messages
Ticket: CM-11857
Reviewed By: Roopa, Daniel W
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-24 10:19:55 -07:00
Julien Fortin
76352436e7 rdnbrd "Interrupted system call" traceback in nlmanager
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   roopa@cumulusnetworks.com

Ticket: CM-12487
2016-08-24 10:19:55 -07:00
Julien Fortin
cee2e13ffb nlmanager: rdnbrd "Interrupted system call" traceback in nlmanager
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   roopa@cumulusnetworks.com
Ticket: CM-12487

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-24 10:19:55 -07:00
Roopa Prabhu
5859b3228e addons: bridge: fix running_vids value when cache is stale
Ticket: CM-12552
Reviewed By: julien, nikhil
Testing Done: tested with failing config with bridge-access 1

This is similar to the fix done in the below commit for pvid:
"5061730ea5bf ("addons: bridge: fix default pvid handling in cases where
cache is stale")"

easier steps to reproduce:
- have a vlan aware bridge with more than one ports
- add 'bridge-access 1' to one of the ports
- boot the box with the config
- check that the  vlans are fine
- ifdown <interface_with_bridge_access_1>
- ifreload -a
- the interface with bridge_access 1 does
not have the pvid flag on vlan 1

This patch makes sure we assume the right running
vid and pvid value ie [1] and 1 if the
cache returns no values. vid = [1] and pvid = 1
are the kernel default/initial values for a port.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:55 -07:00
Roopa Prabhu
0184c8c537 addons: vrf: don't delete vrf map file at init if mgmt vrf already exists
Ticket: CM-12084
Reviewed By: julien, nikhil
Testing Done: tested with --allow=mgmt class

This fixes a problem where vrf map file was getting deleted
at boot during the second invocation of ifup. This is because
the code uses PERFMODE to check it is boot..but does
not realize that this may not be the first invocation of
ifup during the boot.

This patch adds additional checks for mgmt netdev to
make sure we delete the vrf map file only the first time.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:55 -07:00
Julien Fortin
c94041b0bd netlink: adding ifacename name at the beginning of log info msg
Ticket: None
Reviewed By: Roopa
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-24 10:19:54 -07:00
Julien Fortin
9df4f95b45 ifupdownaddons: modulebase: log_error will log.error or raise an exception
Ticket: None
Reviewed By: Roopa, Nikhil G
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-24 10:19:54 -07:00
Julien Fortin
c4fd9087b5 netlink: logging equivalent iproute2 commands
Ticket: None
Reviewed By: Roopa, Nikhil G
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-24 10:19:54 -07:00
Roopa Prabhu
bdd4e7fed0 addons: bridge: move the default running_pvid assignment to before
pvid_to_del is calculated

Ticket: CM-12355
Reviewed By: julien, nikhil
Testing Done: tested with failing config

My previous fix for the same bug did not fix the problem completly.
In this patch all running pvid calculation
is done before the pvid_to_del is calculated.
This makes sure the old pvid is deleted if it is not
the same as current pvid in all cases

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:54 -07:00
Roopa Prabhu
2906e48d49 addons: vxlan: fix ifquery running to not proceed when vxlan-id is not
available

Ticket: CM-12378
Reviewed By: julien, nikhil
Testing Done: tested ifquery running with examples in the bug

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:54 -07:00
Roopa Prabhu
61bf5eef24 modulebase: dont set iface status to error if raise_err is False
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:54 -07:00
Roopa Prabhu
4739898bf5 addons: vrf: change warn to error if vrf master is not configured
Ticket: CM-12360
Reviewed By: julien, nikhil
Testing Done: tested vrf slaves without master

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:54 -07:00
Julien Fortin
4e979b1bcf nlpacket: add new attribute: AttributeStringInterfaceName with length check
Ticket: CM-12302
Reviewed By: Daniel, Roopa, Nikhil G
Testing Done: ifupdown2 smoke test

With this pretty straight forward, we introduce a new Attribute in nlmanager,
so that we have single check and no code redundancy for ifname length. This
also prevent loosing time sending a netlink packet for an known error.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-24 10:19:54 -07:00
Roopa Prabhu
804dcbd02d addons: bridge: fix default pvid handling in cases where cache is stale
Ticket: CM-12355
Reviewed By: julien, nikhil
Testing Done: tested with failing config

This can happen if the bridge vlans were
cached before the interface become a bridge port.
and when the interface becomes a bridge port
kernel adds a default pvid of 1. so this patch
assumes a default pvid is 1 if we did not find
anything in the cache. This will delete
the default pvid of 1 if the user has configured a
different pvid.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:53 -07:00
Julien Fortin
2e04b8c01c nlmanager: changing messages logged and raised when RXed NLMSG_ERROR
Ticket: None
Reviewed By: Roopa, Nikhil G, Daniel
Testing Done: ifupdown2 smokes

The message logged and the exception raised by nlmanager, when receiving
an NLMSG_ERROR packet from the kernel, wasn't super explicit plus if the
error wasn't a netlink related failure we didn't provide any information
Now we use strerror with the provided error code to generate a nice msg.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-24 10:19:53 -07:00
Julien Fortin
c268fccf3f nlmanager: wait for ACK after single packet operation
Ticket: None
Reviewed By: Roopa, Nikhil G, Daniel
Testing Done: ifupdown2 smoke

We used to have these checks in the old rtnetlink python library.
They were missing in python-nlmanager this was a big regression for
ifupdown2.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-24 10:19:53 -07:00
Balakrishnan Raman
a61925af9f ifupdownaddons: iproute2: Cache vxlan remote ip addresses only if
statically configured

Ticket: CM-12277
Reviewed By: CCR-5059
Testing Done: ifreload with a VxlanClagClosConfig.py config

get_vxlan_peers gets remote ip addresses if they are statically configured
through ifupdown2 (vxlan-remoteip <address>). These are cached in
ifupdown2's link object so that they can be used in 'ip link set' (if link
exists already), 'ifquery -r' and 'ifquery -c'. ifupdown2 should ignore and
not cache these addresses if they are provisioned by vxrd. Check if vxrd is
running before caching remote ip addresses. This helps in optimizing time
taken to ifreload with 1k bridge/vxlan interfaces (vlan-aware bridge) in a
vxrd/vxsnd setup.

Signed-off-by: Balakrishnan Raman <ramanb@cumulusnetworks.com>
2016-08-24 10:19:53 -07:00
Roopa Prabhu
c14de85ca4 addons: ethtool: skip speed zero from query running
kernel might return running speed 0 if port does
not have carrier

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:53 -07:00
Roopa Prabhu
6fa93b22fe addons: address: never reset mtu on lo implicity
we should leave the mtu on lo to the default mtu
if user has not requested to change it. lo has
a larger mtu because it does not really depend on a
physical mtu.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:53 -07:00
Roopa Prabhu
7072ccbe19 addons: bridge: use bridge json output for vlan
Ticket: CM-11274
Reviewed By: julien, nikhil
Testing Done: tested with various bridge config

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:53 -07:00
Roopa Prabhu
ac7f1419fa addons: vrf: bring up vrf master when ALL or CLASS
Ticket: CM-12084
Reviewed By: julien, nikhil
Testing Done: Tested ifreload/ifup/ifdown --allow=<class>

vrf slave brings up the master if master is not up yet.
Today this is done only when ALL (auto) option is set
just as an optimization. because you dont want to bring
up the master in cases where user just wants to
bring up the vrf slave. eg ifup -v eth0.

This does not work so well, when user uses
--allow classes to bring up vrf master and slaves
together (eg mgmt vrf).

This patch removes the ALL check when bringing
up master and replaces it with an ALL or
CLASS check. ie make sure vrf master belongs to the
same class as you when CLASS is specified.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:53 -07:00
Roopa Prabhu
2a8440a4b5 ifupdown: move IFACE_CLASS ifupdownmain flag to ifupdownflags.CLASS
This patch moves ifupdownmain flag IFACE_CLASS to
ifupdownflags.CLASS. ifupdownflags.CLASS is set to true
if the user is asking for a class of interfaces.
example: ifreload --allow=mgmt

By moving it to ifupdownflags, we make it visible
to add modules.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:52 -07:00
Roopa Prabhu
f78ba1de35 addons: vlan: fix checking of vlan device in query-running
Ticket: CM-11804
Reviewed By: julien, nikhil
Testing Done: Tested with failing config in the bug

This patch makes sure macvlan devices are ignored by ifquery -ra

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-08-24 10:19:52 -07:00
Julien Fortin
e02167ed35 nlmanager: changing log level (info->debug) for TXed messages
Ticket: CM-11857
Reviewed By: Roopa, Daniel W
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-23 16:38:36 -07:00