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

654 Commits

Author SHA1 Message Date
482b2fab80 attribute syntax check using validvals/validrange and keywords
Ticket: CM-8101
Reviewed By: CCR-4949
Testing Done: smoke tests + ran ifup -a -s on every interface configuration file from GSS cl-supports collection

This commit is introducing ~20 keywords. The value of the different attributes
will be check against raw values and <keywords>:

'<mac>'
'<text>'
'<ipv4>'
'<ipv6>'
'<auto>': "auto"
'<ipaddr>': ipv4/6 with preflix len
'<number>'
'<interface>'
'<ipv4-vrf-text>': equivalent to: <ipv4> "vrf" <text>
'<number-ipv4-list>': example: "100=172.16.100.1 101=172.16.101.1"
'<interface-list>': example: "swp1 swp2 swp3"
'<ipv4/prefixlen>'
'<ipv6/prefixlen>'
'<ipaddr/prefixlen>'
'<number-range-list>': example: "2000 2200-3000"
'<interface-range-list>': example: "swp1=100 swp2=100" ('validrange' : ['0', '65535'])
'<mac-ipaddr/prefixlen-list>'
'<number-interface-list>': example: "4 swp1 swp2"
'<interface-yes-no-list>': example: "swp1=yes swp2=no"
'<interface-yes-no-0-1-list>'
'<interface-yes-no-auto-list>'

It's possible to combine a keyword with a range from validrange. example:
validrange: 10-50
validvals: <intrface-range-list>
value: swp1=21 swp2=42 ...

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-08-01 09:28:16 +02:00
0dd2f0d18a addons: bridge & mstpctl: avoid printing default and port attributes under vlan aware bridge
Ticket: CM-12036
Reviewed By: roopa
Testing Done: used same config from bug

This patch avoids printing port attributes under
vlan-AWARE-bridge on 'ifquer -ra'.

This patch also avoids printing following attributes
on 'ifquer -ra' if not defined:
mstpctl-maxhops
mstpctl-portpathcost
mstpctl-treeportcost

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-07-29 15:33:14 -07:00
1b284018d5 addons: addressvirtual: enslave macvlans on vrf slaves to the vrf master
Ticket: CM-11803
Reviewed By: dsa, scotte, wkok, nikhil, julien
Testing Done: tested config of address-virtual lines on vrf slaves

This patch does the following:
- addressvirtual: enslaves macvlans created on vrf slaves
to the vrf master
- vrf: when looking for stale slaves on vrf master, skip
macvlan devices. This code does basic checking right now
and can be improved to include more cases.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-26 14:43:47 -07:00
1efda6c232 addons: bridge: Fix KeyError when 'bridge-pvid' is not in the set 'bridge-vid'
Ticket: CM-11998
Reviewed By: roopa
Testing Done: used same config given in bug descreption

When we try to unconditionally remove 'pvid' from 'vids' set,
we run into KeyError if 'vids' set doesn't contain 'pvid'

Example configuration:
auto swp9
iface swp9
   mstpctl-portautoedge no

auto frontnet
iface frontnet
   bridge-vlan-aware yes
   bridge-ports swp9
   bridge-vids 10
   bridge-stp on

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-07-26 10:33:46 -07:00
bb70f92385 addons: mstpctl: handle vlan aware bridge port config under port
Ticket: CM-8629
Reviewed By: roopa, julien
Testing Done: used same config given in bug description

This patch avoids vlan aware bridge over-writing it's port's
config with default values

Example configuration:

auto swp9
iface swp9
   mstpctl-portautoedge no

auto frontnet
iface frontnet
   bridge-vlan-aware yes
   bridge-ports swp9
   bridge-vids 10
   bridge-stp on

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-07-26 10:33:46 -07:00
0232d1bbfd addons: address: add both v4 and v6 gateways instead of just one.
Ticket: CM-8596, CM-5118
Reviewed By: roopa, julien
Testing Done: used same config mentioned in bug

Previously, only first configured gateway is set as default route.
This patch sets all the configured gateways as default routes.

This patch also removes default route on ifup
after removing 'gateway' from the interface

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-07-26 10:33:46 -07:00
b653111a27 addons: vxlan: localtunnelip check before netlink call, prevent from overwriting the anycast ip
Ticket: CM-11867
Reviewed By: Roopa, Balki, Nikhil G
Testing Done: tests/l2/clag_vxlan_aa_test.py

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-21 01:58:09 +01:00
c0d3d93b9c addons: bridge: fix 'ifquery -c' 'bridge vid error' on vlan aware bridge port
Ticket: CM-11811
Reviewed By: roopa, julien
Testing Done: used same configuration from ticket

For a VLAN aware bridge, if 'bridge-pvid' is not configured,
auto bridge
iface bridge
    bridge-ports swp7 swp8
    bridge-vids 1-200
    bridge-vlan-aware yes

'1' is would be running pvid and [2-200] would be running vids.
While doing _query_check() we compare configred versus running
vids excluding running 'pvid'. Configured vids here is [1-200]
and running is [2-200], but instead of excluding running 'pvid'
we used to exclued configured 'pvid' which is None in this case.
Comparison used to fail because of this.

This patch excludes running 'pvid' instead of configured 'pvid'
during _query_check()

This patch also fixes 'ifquery -c' error for bridge-pvid if
configured under a port of vlan aware bridge

This patch also avoids printing 'bridge-pvid' on 'ifquery -c'
if bridge-pvid is not configured under vlan aware bridge port

sample configuration:
auto swp4
iface swp4

auto swp7
iface swp7
    bridge-pvid 2

auto swp8
iface swp8
    bridge-pvid 2

auto bridge
iface bridge
    bridge-ports swp4 swp7 swp8
    bridge-vids 1-200
    bridge-pvid 20
    bridge-vlan-aware yes

sample output:
root@dell-s3000-02:~# ifquery -c -a
auto swp4
iface swp4                                                      [pass]
    bridge-pvid 20                                              [pass]

auto swp7
iface swp7                                                      [pass]
    bridge-pvid 2                                               [pass]

auto swp8
iface swp8                                                      [pass]
    bridge-pvid 2                                               [pass]

auto bridge
iface bridge                                                    [pass]
    bridge-vlan-aware yes                                       [pass]
    bridge-ports swp8 swp7 swp4                                 [pass]
    bridge-pvid 20
    bridge-vids 1-200                                               []

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-07-20 11:38:54 -07:00
20fd3a0624 addons: dhcp: stop IPv6 dhclient on ifdown and add delay before starting dhclient
Ticket: CM-11043
Reviewed By: roopa
Testing Done: used the config mentioned in bug

This patch adds a delay before starting IPv6 dhclient to
make sure the configured interface/link in up.

Also, ifdown on a IPv6 interface, this patch makes sure
that the link in up before dhcp release. Dhcp release is
done using a default lease file.

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-07-18 15:40:23 -07:00
cb8b16acbf addons: bridge: fix 'ifquery -c' 'bridge vid error' on vlan aware bridge port
Ticket: CM-11811
Reviewed By: roopa, julien
Testing Done: used same configuration from ticket

For a VLAN aware bridge, if 'bridge-pvid' is not configured,
auto bridge
iface bridge
    bridge-ports swp7 swp8
    bridge-vids 1-200
    bridge-vlan-aware yes

'1' is would be running pvid and [2-200] would be running vids.
While doing _query_check() we compare configred versus running
vids excluding running 'pvid'. Configured vids here is [1-200]
and running is [2-200], but instead of excluding running 'pvid'
we used to exclued configured 'pvid' which is None in this case.
Comparison used to fail because of this.

This patch excludes running 'pvid' instead of configured 'pvid'
during _query_check()

This patch also fixes 'ifquery -c' error for bridge-pvid if
configured under a port of vlan aware bridge

sample configuration:
auto swp4
iface swp4

auto swp7
iface swp7
    bridge-pvid 2

auto swp8
iface swp8
    bridge-pvid 2

auto bridge
iface bridge
    bridge-ports swp4 swp7 swp8
    bridge-vids 1-200
    bridge-pvid 20
    bridge-vlan-aware yes

sample output:
root@dell-s3000-02:~# ifquery -c -a
auto swp4
iface swp4                                                      [pass]
    bridge-pvid 20                                              [pass]

auto swp7
iface swp7                                                      [pass]
    bridge-pvid 2                                               [pass]

auto swp8
iface swp8                                                      [pass]
    bridge-pvid 2                                               [pass]

auto bridge
iface bridge                                                    [pass]
    bridge-vlan-aware yes                                       [pass]
    bridge-ports swp8 swp7 swp4                                 [pass]
    bridge-pvid 20
    bridge-vids 1-200                                               []

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-07-18 15:40:23 -07:00
8c20f6c69e Revert "Revert "addons: bond: reverting validvals "<mac>" change""
This reverts commit b19c6c100a3ccec5c858342b8349f1ee441bf153.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-18 21:00:29 +01:00
81d9736d03 nlmanager: changing log level to debug for RXed messages
Ticket: CM-11857
Reviewed By: Daniel, Roopa
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-18 10:45:45 +01:00
5dfc8d7422 Revert "addons: usercmds: adding environment variables passed by the ifupdown2 to user scripts"
This reverts commit cfc51ed18be9aee902cbc89a57350d9e99a1950d.

this commit seems to have broken usercmds. reverting it until it is
fixed.

Closes: CM-11856
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-17 22:04:01 -07:00
6df72b4582 addons: bridge: batch bridge commands
Ticket: CM-11274
Reviewed By: julien, nikhil, wkok
Testing Done: tested with vxlan scale config

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-16 16:36:14 -07:00
508f6e90ad ifupdownaddons: iproute2: add bridge_commit_batch api to batch bridge
commands

Ticket: CM-11274
Testing Done: julien, wkok, nikhil

It uses and goes with the the other batch variables and apis.
This one just calls the 'bridge -batch' command instead
of the 'ip -batch' command.

This can be used to batch bridge commands.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-16 16:36:14 -07:00
d07b5a9fbb addons: ethtool: ignore logical interfaces with link_kind
Ticket: CM-11517
Reviewed By: julien, nikhil, jtoppins
Testing Done: ethtool sanity test

ethtool module should really care only about
physical interfaces. so, this patch makes ethtool
module ignore all logical interfaces, ie interfaces
with link_kind set.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-16 16:22:49 -07:00
cfc51ed18b addons: usercmds: adding environment variables passed by the ifupdown2 to user scripts
Ticket: None
Reviewed By: Roopa
Testing Done: with a dummy script I printed the value passed by ifupdown
After the changes I did the same with ifupdown2 and checksd if the values
matched correctly.

This issue was reported on the github repository.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-15 17:00:09 +01:00
800417aeb2 ifupdown: networkinterfaces: making sure template engine will only be initialized once.
Ticket: None
Reviewed By: Roopa
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-15 12:18:36 +01:00
e272efd9ab ifupdown: networkinterfaces: not importing template engine if no mako keyword found
Ticket: CM-11807
Reviewed By: Roopa, Daniel
Testing Done:

Loading the default template engine (mako) is adding an extra overhead: 100ms
We also import the template engine even if we are dealing with a json input
The overhead is noticable when using NCLU.

With this change we are now important the template engine when a keyword is
found in the configuration file.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-14 20:09:42 +01:00
60dfcbdf9c ifupdown: fixes to make addon scripts work via special config options
ifupdown2 can invoke scripts under /etc/network/if-*.d/*
in the required order with the required environment variables.
This patch includes fixes to execute these scripts.

The following attributes in /etc/network/ifupdown2/ifupdown.conf
can influence the execution behaviour of python-addon modules
and /etc/network/if-*.d/*

<ifupdown.conf>
addon_syntax_check=0

addon_scripts_support=1

addon_python_modules_support=1
</ifupdown.conf>

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-13 15:39:06 -07:00
8c26cde05d man.rst: fix spelling mistakes as reported by lintian and Piotr
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-13 15:39:06 -07:00
f0203a8f2f config: enable template by default for cumulus
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-13 15:39:06 -07:00
f27710fe96 ifupdown: disable template execution by default
User will have to enable it by enabling it in
/etc/network/ifupdown2.conf template_enable=1

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-13 15:39:06 -07:00
b54179d2ae addon: handle unsupported modules
Example: If /sbin/ethtool is not installed dont run the
ethtool addon module.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-13 15:39:06 -07:00
0aeb3df334 ifupdownaddons: bridgeutils: build cache only if bridge-utils installed
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-13 15:39:06 -07:00
a28b54359f addons: addressvirtual: allowing address-virtual attr for vrf slave interfaces
Ticket: CM-11745
Reviewed By: Roopa, Nikhil G
Testing Done: configuration provided in the bug

User was attempting to configure a traditional bridge under a VRF with VRR.
When issuing ifreload -a, the configuration failed to apply with an error.

Applying an address-virtual keyword to an interface with upper interfaces
or parent interfaces was not allowed. But now we are allowing the use of
this keyword only for vrf slaves.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-13 23:25:07 +01:00
eb377c6ca2 addons may implement syntax_check method to perform specific syntax checks
and validation

Ticket: CM-8101
Reviewed By: Roopa
Testing Done:

The goal of this commit is to provide the addons a new way to perform their
own specific syntax checks. By implementing `syntax_check` method.

The addons will have to make sure the provided ifaceobj is valid.
e.g. vxlan.py:syntax_check(ifaceobj) should check:
self._is_vxlan_device(ifaceobj)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-12 16:31:29 +01:00
6080ea9f9c importing: "nlmanager: changing log level info->debug for TXed messages"
Ticket: CM-11708
Reviewed By: Roopa, Daniel
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-12 00:39:44 +01:00
5fd9723752 importing: "nlmanager: removing IFLA_VXLAN_LINK attribute from packet when creating vxlan"
Ticket:
Reviewed By: Roopa, Daniel
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-12 00:34:56 +01:00
b19c6c100a Revert "addons: bond: reverting validvals "<mac>" change"
This reverts commit 3861c72cf6132ba79147911c7fe3498cab57de3e.
2016-07-11 20:37:41 +01:00
ec03145998 addons: vxlan: fixing wrong vxlan-id range
Ticket: None
Reviewed By: Roopa, Daniel
Testing Done: This is not affecting ifupdown2 yet
the validvals attribute is only used by ifedit

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-11 20:36:18 +01:00
c4eac60d6d ifupdownaddons: iproute2: fix 'ifquery -c' fail for 'bridge-pvid' on bridge ports
Ticket: CM-11624
Reviewed By: roopa, julien
Testing Done: using configuration mentioned in the bug

This patch fixes 'ifquery -c' failure for 'bridge-pvid' on
all bridge ports.

The following format of '/sbin/bridge -c vlan show' output was not handled properly
by iproute2

port  vlan ids
swp1   600
       700-710
       711 PVID Egress Untagged
       712-900

iproute2 was parsing the '/sbin/bridge -c vlan show' output with the assumption that
pvid line '711 PVID Egress Untagged' appears before all the vland ids.

Something like this:
port  vlan ids
swp1   711 PVID Egress Untagged
       600
       700-710
       712-900

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-07-11 09:52:26 -07:00
22945dd634 addons: mstpctl: complete ifquery -r support
Ticket: CM-7841
Reviewed By: roopa, julien
Testing Done: tested all the bridge attributes

added 'ifquery -r' support for 'mstpctl-portpathcost', 'mstpctl-treeportcost', 'mstpctl-portautoedge', 'mstpctl-portbpdufilter', 'mstpctl-portnetwork'

Below is the sample configuration and output

root@dell-s3000-02:~# ifquery -a
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto br0
iface br0
  bridge-vlan-aware yes
  bridge-ports swp42 swp43
  mstpctl-fdelay 14
  mstpctl-txholdcount 5
  mstpctl-forcevers rstp
  mstpctl-maxhops 14
  mstpctl-treeprio 32768
  mstpctl-maxage 19
  mstpctl-hello 3
  mstpctl-ageing 200

auto swp42
iface swp42
  mstpctl-portadminedge yes
  mstpctl-portbpdufilter yes
  mstpctl-portnetwork yes
  mstpctl-portautoedge yes
  mstpctl-treeportprio 127
  mstpctl-portpathcost 10
  mstpctl-portrestrtcn yes
  mstpctl-portrestrrole yes
  mstpctl-bpduguard yes
  mstpctl-treeportcost 100
  mstpctl-portp2p yes

auto swp43
iface swp43
  mstpctl-portadminedge yes
  mstpctl-portbpdufilter yes
  mstpctl-portnetwork yes
  mstpctl-portautoedge yes
  mstpctl-treeportprio 127
  mstpctl-portpathcost 10
  mstpctl-portrestrtcn yes
  mstpctl-portrestrrole yes
  mstpctl-bpduguard yes
  mstpctl-treeportcost 100
  mstpctl-portp2p yes

root@dell-s3000-02:~# ifquery -ra
auto swp42
iface swp42
  mstpctl-portautoedge yes
  mstpctl-portbpdufilter yes
  mstpctl-portpathcost 10
  mstpctl-treeportcost 100
  mstpctl-portnetwork yes
  mstpctl-portadminedge yes
  mstpctl-portp2p yes
  mstpctl-portrestrrole yes
  mstpctl-portrestrtcn yes
  mstpctl-bpduguard yes
  link-speed 0
  link-duplex half
  link-autoneg off

auto swp43
iface swp43
  mstpctl-portautoedge yes
  mstpctl-portbpdufilter yes
  mstpctl-portpathcost 10
  mstpctl-treeportcost 100
  mstpctl-portnetwork yes
  mstpctl-portadminedge yes
  mstpctl-portp2p yes
  mstpctl-portrestrrole yes
  mstpctl-portrestrtcn yes
  mstpctl-bpduguard yes
  link-speed 0
  link-duplex half
  link-autoneg off

auto br0
iface br0
  vxlan-ageing 300
  bridge-vlan-aware yes
  bridge-mcqifaddr 0
  bridge-mcquerier 0
  bridge-mcsnoop 1
  bridge-mcrouter 1
  bridge-stp yes
  bridge-ports swp43 swp42
  mstpctl-portadminedge  swp42=yes swp43=yes
  mstpctl-fdelay 14
  mstpctl-portnetwork  swp42=yes swp43=yes
  mstpctl-txholdcount 5
  mstpctl-maxage 19
  mstpctl-portbpdufilter  swp42=yes swp43=yes
  mstpctl-maxhops 14
  mstpctl-portrestrtcn  swp42=yes swp43=yes
  mstpctl-portpathcost  swp42=10 swp43=10
  mstpctl-portautoedge  swp42=yes swp43=yes
  mstpctl-hello 3
  mstpctl-portrestrrole  swp42=yes swp43=yes
  mstpctl-bpduguard  swp42=yes swp43=yes
  mstpctl-ageing 200
  mstpctl-treeportcost  swp42=100 swp43=100
  mstpctl-portp2p  swp42=yes swp43=yes

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-07-11 09:52:26 -07:00
f1bec02e27 nlmanager: nlpacket: vxlan dstport config incorrect
Ticket: CM-11735
Reviewed By: Roopa, Daniel
Testing Done: creating a vxlan with ifupdown then checking the dstport with
ip -d link show $vlxanName

When creating a vxlan nlmanager didn't re-order/byte swap the dstport value
to little endian

46354 instead of 4789

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-10 03:40:25 +01:00
45c264cd8d ifupdown2 defaults for link attributes are not applied
Ticket: CM-11718
Reviewed By: CCR-4931
Testing Done: Tested complete regression suite on hardnode in 3.0.

This patch fixes a problem in the ethtool addon module where a single iface stanza was
configured for a link-speed (1G) other then the default (10G). The link-speed config is then
removed or commented out but the link-speed is not restored to its default value (10G) because of
incorrect logic.
2016-07-07 17:16:22 -07:00
32a74516d1 addons: moving vxlan creation from iproute2 to netlink (via nlmanager)
Ticket: CM-8035
Reviewed By: CCR-4896
Testing Done: ifupdown smoke, -t vxlan tests

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-05 14:45:08 +02:00
182f5a1443 netlink: adding support for netlink vxlan call via nlmanager
Ticket: CM-8035
Reviewed By: CCR-4896
Testing Done: ifupdown smoke, -t vxlan tests

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-05 14:42:54 +02:00
3696839d82 python-nlamanger: importing vxlan creation support commit
Ticket: CM-8035
Reviewed By: CCR-4896
Testing Done: ifupdown smoke, -t vxlan tests

julien@hydra-01:~$ time runtests.sh -d cel-redxp-06 -r result_vxlan_all.txt -f . -T vxlan_all.log -l INFO -k $VM_BASE_KERNEL -i $VM_BASE_IMG $TESTS_HOME/tests/ -t vxlan

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-07-05 14:40:19 +02:00
4a41d24b35 addons: bridge: ifquery -c fix for port attributes
Ticket: CM-11195
Reviewed By: roopa, julien
Testing Done: used the configuration mentioned in bug description

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>

running values for bridge-portmcrouter, bridge-portmcfl, and bridge-portprios
were accessed using invalid keys.
2016-06-30 10:17:31 -07:00
0aa91758f4 addons: vrf: remove the FIB rules for vrf devices
Ticket: CM-11392
Reviewed By: roopa, dsa, julien
Testing Done: multiple vrf devices on dell-s3000-02

Now that the l3mdev FIB rule is in the CL3.1 kernel tree,
ifupdown2 no longer needs to manage FIB rules for VRF devices.

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2016-06-27 15:30:49 -07:00
26e7207b6b nlmanager: nlpacket: throw an error if the user of nlmanager tries to encode an attribute that we haven't added an encode() method for
+ adding one byte attribute class for protodown operations.

Ticket: CM-11581
Reviewed By: CCR-4721
Testing Done: Smoke + custom interface file with clag bond that requires protodown.

- nlmanager will now throw an exception if a user is trying to use the default
attribute class when in fact he should use a more specific attribute class.

- The protodown implementation needed to use a one byte attribute to set the protodown state

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-06-27 00:24:18 +01:00
f8ad40ceea ifupdown2: Disable IPv6 duplicate address detection on VRR interfaces
Ticket: CM-11511
Reviewed By: CCR-4890
Testing Done: Used "address-virtual" keyword to create VRR interface with IPv6
address. Checked sysctl and dad failures.

In a VRR setup, both switches are programmed with the same IPv6 address and that
address is active on both switches. This causes the IPv6 duplicate address
detection to kick in and diable the use of one of the address on one of the
switches. This patch causes duplicate address detection to be disabled on VRR
interfaces by setting the net.ipv6.conf.<ifname>.accept_dad and
net.ipv6.conf.<ifname>.dad_transmits sysctl's to 0. The only IPv6 addresses
which are defined on these interfaces are the virtual addresses and the link
local address (which is unused). No other operational IPv6 addresses should ever
be assigned to these interfaces. Instead, operational IPv6 addresses should be
assigned to the "base", or lower, interface of the VRR interface.
2016-06-24 10:49:27 -07:00
5b7f45794f 'this is an ACK' message should be log.debug() not log.info()
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Julien Fortin <julien@cumulusnetworks.com>
2016-06-24 00:51:26 +01:00
ea2bf79dcf Attribute 20 is not defined in Route.attribute_to_class
Ticket: CM-11515

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Julien Fortin <julien@cumulusnetworks.com>
2016-06-24 00:48:13 +01:00
d8a846b8ae Remove dependancy on tabulate
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   roopa@cumulusnetworks.com
2016-06-21 22:03:10 +01:00
117d7654af addons: vlan: ifquery will try to get the vlan-id from the ifacename if vlan-id attr is missing
Ticket: CM-11485
Reviewed By: Roopa
Testing Done: config from the github issue

First reported here https://github.com/CumulusNetworks/ifupdown2/issues/10
ifquery just like ifupdown should try to get the vlan-id from the iface name
if vlan-id attr is not specified.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-06-21 15:23:15 +01:00
c9b929f97e addons: vrf: moving replacing rtnetlink_api call with the new netlink api
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-06-16 03:39:12 +01:00
3861c72cf6 addons: bond: reverting validvals "<mac>" change
Ticket: CM-11331
Reviewed By:
Testing Done:
2016-06-16 03:37:36 +01:00
594fb088e8 small easy: support (0|1) or (off|on) attribute while keeping backward compatibility
Ticket: CM-8866
Reviewed By: Roopa
Testing Done:

added support for:
* bond-lacp-bypass-allow (0|1)
* bond-use-carrier (0|1)
* bridge-mcqifaddr (0|1)
* bridge-mcquerier (0|1)
* bridge-mcrouter (0|1)
* bridge-mcsnoop (0|1)
* bridge-portmcrouter (0|1)
* link-autoneg (off|on)
* vxlan-learning (off|on)

these 2 are not yet supported by ifupdown2:
* bond-lacp-bypass-all-active (0|1)
* bond-lacp-fallback-allow (0|1)

This one is left untouched. yes/no doesn't make sense for this attribute.
* bond-lacp-rate (0|1)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-06-16 03:37:36 +01:00
c6370b563b Add validvals to addons, to be used by iface/ifedit wrapper
Ticket: CM-8669
Reviewed By: Julien
Testing Done:

<DETAILED DESCRIPTION (REPLACE)>
2016-06-16 03:37:35 +01:00