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

960 Commits

Author SHA1 Message Date
Nigel Kukard
6a5a7c6b2c For hotplug devices check if the link is present, not up (#28)
Checking operstate would require firmware to be loaded and link
negotiation to of taken place. Some firmwares take a few seconds to
upload and online the device, and some link negotiations take a second
or two.

Immediately checking operstate is not feasible here. Checking if the
link is present is a more suitable non-delaying approach.

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
2017-07-27 01:45:52 +02:00
Julien Fortin
9a5c706f45 Merge remote-tracking branch 'cumulus/dev'
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-02-23 17:17:26 +07:00
Julien Fortin
23cba755ed debian: changelog: update changelog for new version cl3u10 (unreleased)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-02-23 17:11:10 +07:00
Julien Fortin
de1127b0be sbin: start-networking: adjust allow-hotplug behavior to ifupdown
Ticket: Bug#855598: src:ifupdown2: allow-hotplug behaves differently, not UPing interfaces
Reviewed By: Roopa
Testing Done: mark an interface (ethX) as hotplug then reboot

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-02-23 16:42:34 +07:00
Julien Fortin
ac40c03262 sbin: ifupdown2: drop the dependency to pkg_resource, hardcode version number
Ticket:
Reviewed By: Roopa
Testing Done:

Debian Bug#855401, we didn't list pkg_resource as a dependency so the
installation is failing for upstream users.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-02-23 16:31:58 +07:00
Daniel Walton
a981087c9e ifupdown2: bond-downdelay and bond-updelay need validrange
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   julien@cumulusnetworks.com

Ticket: CM-15012
2017-02-23 03:13:40 +12:00
Daniel Walton
932bfff598 ifupdown2: restrict mstpctl-treeprio validvals
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   julien@cumulusnetworks.com

Ticket: CM-15011
2017-02-23 03:12:16 +12:00
Julien Fortin
8a5626d4f4 Merge remote-tracking branch 'origin/dev-next' into dev 2017-02-18 01:46:15 +07:00
Roopa Prabhu
3e587bb524 debian: mark 1.1-cl3u9 RELEASED
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-02-08 10:51:22 -08:00
Roopa Prabhu
85398780f0 debian: add new changelog entry for 1.1-cl3u9
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-02-06 13:24:09 -08:00
Roopa Prabhu
f03e7a2f28 addons: bridge: support for bridge-learning attribute
Ticket: CM-14683
Reviewed By: julien, mallik, anita, vivek, balki, wkok
Testing Done: tested with bridge-learning on off

- support for bridge-learning attribute on bridge ports.
  (currently uses sysfs, must move to netlink soon)
- Additional feature for vxlan bridge ports: sync learning
flag to vxlan bridge ports. No ifquery check for this auto
sync feature.

example config for vxlan ports:
auto vxlan1000
iface vxlan1000
        vxlan-id 1000
        bridge-learning off
        bridge-access 100

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-02-06 10:32:25 -08:00
Nikhil
c3fc3b8f00 addons: bond: adding attribute bond-(up|down)delay
Ticket: CM-8424
Reviewed By: Roopa, Julien
Testing Done: using the config mentioned in bug

updelay

    Specifies the time, in milliseconds, to wait before enabling a
    slave after a link recovery has been detected.  This option is
    only valid for the miimon link monitor.

downdelay

    Specifies the time, in milliseconds, to wait before disabling
    a slave after a link failure has been detected.  This option
    is only valid for the miimon link monitor.

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

Conflicts:
	ifupdownaddons/bondutil.py
2017-02-01 10:45:56 -08:00
Julien Fortin
c09025b2b0 Merge branch 'dev' into dev-next 2017-01-27 23:40:07 +03:00
Julien Fortin
82f84f8278 Revert "ifupdownaddons: bridgeutils: uncomment parsing code for brctl mc attributes"
This reverts commit 65beb82662576c047a281389bd663589dcba09db.

it's causing testifupdown2.py:TestMakoJson to fail... Basically this commit
uncomment codes which parse mc value from brctl output. So `ifquery -r` output
is different (this new attribute show up under the bridge). TestMakoJson at
some point does:
$ ifquery -a -r -t json > running_json
Then later
$ ifup -i running_json...
This ifup fails on:
...
warning: br0: unsupported attribute 'bridge-mclmt'
...
2017-01-27 17:34:13 +03:00
Roopa Prabhu
b258e406af addons: vxlan: ifquery: fix remote-ip handling
Ticket: CM-14628
Reviewed By: julien, nikhil, vivek, mallik
Testing Done: Tested with vxlan config and remote ips added externally

Recent handling of vxlan-purge-routes as part of CM-13815 did not fix
handling of remote ips during ifquery --check and ifquery --running.
This patch fixes ifquery -c and ifquery running for external
vxlan controller cases.

Without this, ifquery --check always returns exit code of 1 for
external vxlan controller configs

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
cl3u8
2017-01-26 14:57:33 -08:00
Julien Fortin
c529c18583 Merge branch 'dev' into dev-next 2017-01-24 02:53:53 +03:00
Nikhil
c426b8dcc7 Revert "addons: mstpctl: reset (default) bridge mstpctl options when users remove settings"
This reverts commit a3d36dd86d6888a0b61b506a534c24ea4867a18f.
Ticket CM-14516 has been filed to track this

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2017-01-20 13:39:45 -08:00
Nikhil
d03b0695e0 addons: mstpctl: ifquery -c --with-default, ignore mstpctl default attributes when stp is off
Ticket: CM-13779
Reviewed By: roopa, satish, julien
Testing Done: testing the config given in the CM

mstpctl showportdetail <bridge> command won't output anything when
bridge-stp is off, therefore ignore mstpctl default attributes during
ifquery -c --with-defaults

This patch also consistently updates bridge and bridge port cache
at the same time.
Earlier bridge and bridge port cache were not consistent
because of the early return condition
    attrs = MSTPAttrsCache.get(bridgename)
        if attrs:
            return attrs
If either of bridge port cache and bridge cache is updated, function used to
return inconsistent cache values

Signed-off-by: Nikhil Gajendrakumar <nikhil@cumulusnetworks.com>
2017-01-20 10:42:05 -08:00
Julien Fortin
65beb82662 ifupdownaddons: bridgeutils: uncomment parsing code for brctl mc attributes
Ticket: None
Reviewed By: Roopa, Nikhil G
Testing Done: ssim ifupdown2-tests

runtests.sh -T ~/result_smoke/single/ifupdown2-tests.log -r ~/result_smoke/single/summary_ifupdown2tests.txt -d cel-redxp-06 -t nightly -l INFO -k $VM_BASE_KERNEL -i $VM_BASE_IMG $TESTS_HOME/tests/smoke/testOneConfigifupdown2.py:Testifupdown2OneConfig

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-19 12:22:44 +03:00
Nikhil
4b875c17c6 addons: address: replay all gateway commands at every ifreload
Ticket: CM-14472
Reviewed By: Roopa, Julien
Testing Done: used the config mentioned in CM

Fix introduced by "addons: address: add both v4 and v6 gateways
instead of just one" changed the way gateway commands were configured.
ifupdown2 does not replay default gateway commands on ifreload

This patch ensures all the gateway commands at every ifreload are replayed

Signed-off-by: Nikhil Gajendrakumar <nikhil@cumulusnetworks.com>
2017-01-17 17:55:35 -08:00
Nikhil
a3d36dd86d addons: mstpctl: reset (default) bridge mstpctl options when users remove settings
Ticket: CM-8401
Reviewed By: Roopa, Julien
Testing Done: tested on all bridge mstpctl attributes.

This patch resets th following bridge attributes to defauls when
users remove settings from interface config file.

mstpctl-treeprio
mstpctl-ageing
mstpctl-fdelay
mstpctl-maxhops
mstpctl-maxage
mstpctl-txholdcount
mstpctl-forcevers
mstpctl-hello

Added an api in policy manager to get policy default value of any
module attribute.

Added a cache for bridge attributes to save some runtime

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2017-01-17 17:19:54 -08:00
Julien Fortin
bea8c8d105 debian: ifupdown2.postinst: refine 'iface lo' regex
Ticket: CM-14362
Reviewed By: Roopa, Nikhil G
Testing Done:

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-17 15:49:23 +03:00
Julien Fortin
ad71ea833c debian: changelog: update changelog for new version cl3u8
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-17 11:03:02 +03:00
Daniel Walton
f66fd6f12e 'link-down' needs 'default' entry in dictionary
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   roopa@cumulusnetworks.com

Ticket: CM-14330
2017-01-13 18:18:39 +00:00
Julien Fortin
5b66674938 addons: address: log error when ip route gateway command fails
Ticket: CM-14386
Reviewed By: Roopa, Purna, NIkhil G
Testing Done:

We have incorrect Address Range and Default g/w configuration. Kernel will give
error in such condition and ignore the route. but ifupdown2 is masking this
error and making user in blind spot.

$ ifdown -a -X eth0
$ ifreload -a
error: h2t_c-1: cmd 'ip route add table DataVrf1080 default via 3.0.0.1 dev h2t_c-1' failed: returned 2 (RTNETLINK answers: Network is unreachable
)
$ echo $?
1
$ ifquery -a
auto h2t_c-1
iface h2t_c-1
      address 6.0.0.1/26
      address 2001:fee1::1/64
      bond-slaves swp1 swp2
      bond-mode 802.3ad
      bond-miimon 100
      bond-min-links 1
      bond-xmit-hash-policy layer3+4
      bond-lacp-rate 1
      mtu 9152
      alias Local Node/s hostd-1-1 and Ports swp1 swp2 <==> Remote  Node/s torc-1-1 torc-1-2 and Ports swp7 swp7
      gateway 3.0.0.1
      gateway 2001:fee1::1
      vrf DataVrf1080

auto DataVrf1080
iface DataVrf1080
      vrf-table 1080

$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-13 06:51:28 +03:00
Julien Fortin
23d70d0414 addons: bridge: warn/err if bridge-access is missing under vxlan bridge VA port
Ticket: CM-14209
Reviewed By: Julien
Testing Done:

vids was a list and pvid is not a list, hence the check was failing

$ cat /etc/network/interfaces
auto vxlan1000
iface vxlan1000
      vxlan-id 1000
      vxlan-local-tunnelip 172.16.20.103
      vxlan-remoteip 172.16.20.106

auto bridge
iface bridge
      bridge-vlan-aware yes
      bridge-ports swp1 vxlan1000
      bridge-vids 100 200

$
$ ifdown -a -X eth0
$ ifreload -a -s
warning: vxlan1000: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
$ ifreload -a
warning: bridge: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
error: bridge: errors applying port settings
$ ifreload -a
error: vxlan1000: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
warning: bridge: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
error: bridge: errors applying port settings

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-12 23:08:57 +03:00
Roopa Prabhu
cc90a0c8ec Revert "addons: bridge: warn/err if bridge-access is missing under vxlan bridge VA port"
This reverts commit 4e2db079564a5055a03d2e7e97807b7956c6e110.

reverting because of some reported false errors.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-11 19:58:02 -08:00
Julien Fortin
4e2db07956 addons: bridge: warn/err if bridge-access is missing under vxlan bridge VA port
Ticket: CM-14209
Reviewed By: Roopa
Testing Done:

$ cat /etc/network/interfaces
auto vxlan1000
iface vxlan1000
       vxlan-id 1000
       vxlan-local-tunnelip 172.16.20.103
       vxlan-remoteip 172.16.20.106

auto bridge
iface bridge
       bridge-vlan-aware yes
       bridge-ports swp1 vxlan1000
       bridge-vids 100 200

$
$ ifdown -a -X eth0
$ ifreload -a -s
warning: vxlan1000: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
$ ifreload -a
warning: bridge: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
error: bridge: errors applying port settings
$ ifreload -a
error: vxlan1000: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
warning: bridge: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
error: bridge: errors applying port settings
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-12 03:19:19 +03:00
Julien Fortin
aec6cd82f6 addons: bridge: fix syntax check failing on bridge without port
Ticket: CM-13653
Reviewed By: Roopa, Daniel W
Testing Done:

$ cat /etc/network/interfaces
auto bridge
iface bridge
    bridge-vids 10-15
    bridge-vlan-aware yes

$ ifup --syntax-check --verbose --all --interfaces /etc/network/interfaces
info: loading builtin modules from /usr/share/ifupdown2/addons
info: executing /var/lib/ifupdown2/hooks/get_reserved_vlan_range.sh
info: executing /bin/pidof -x clagd
info: executing /var/lib/ifupdown2/hooks/get_reserved_vlan_range.sh
info: executing /bin/pidof mstpd
info: executing /sbin/ip rule show
info: executing /sbin/ip -6 rule show
info: address: using default mtu 1500
info: 'link_master_slave' is set. slave admin state changes will be delayed till the masters admin state change.
info: processing interfaces file /etc/network/interfaces
$ echo $?
0
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-11 23:01:11 +03:00
Roopa Prabhu
b207b83d8c vxlan: add new attribute vxlan-purge-remotes to make purging remotes explicit
Ticket: CM-13815
Reviewed By:
Testing Done: Tested remote purging

vxlan purging remotes is a feature where we clean up
existing fdb remote entries in favor of the ones specified in the
interfaces file. Obviously in precense of an external controller
like bgp or vxrd this is not a good thing because these remotes
maybe installed by these external controller  daemons.
This patch makes the purgining behaviour explicit by a new attribute.
We will ship with a default policy file which sets vxlan-purge-remotes to no.

This also cleans up a bug introduced by fix to CM-13767 where we were
trying to delete default remote entry pointing to the local ip.

more details below.

problem:
for static configuration, ifupdown2 has some code to "purge" existing
default remote fdb entries and install
new ones corresponding to the ones specified in the interfaces file
(with vxlan-remoteip).
For non-static configuration (ie in presence of an external controller),
it skips this "purge"...because these entries
maybe added by an external controller. To detect that there is no
external controller running..., today it
checks if the vxrd process is running or not. We need to extend this
check to now include bgp (for evpn)...and it gets trickier with bgp
since just checking the quagga pid is not good.

Solution:
I would like to make this purging explicit with an attribute. This patch
adds a 'vxlan-purge-remotes yes|no' attribute. vxlan remote address purging
will take into affect when:
        vxlan-remoteip attribute is present in the interfaces file
        or
        vxlan-purge-remotes is set to 'yes'

We will ship a ifupdown2 default policy file to disable purging by
default (vxlan-purge-remotes no).
For existing customer deployed static configs, since the interfaces file
will already have remote entries, this change
will behave as existing code (ie purge = yes).

For existing vxrd deployments, as long as already deployed interfaces
files have no vxlan-remoteip entries,
this patch does not change any behavior (can people confirm that
existing vxrd deployments have no vxlan-remoteip entries in their
interfaces ?)

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-10 17:52:41 -08:00
Julien Fortin
b8b579f36d Merge branch 'dev' into dev-next 2017-01-08 16:32:35 +03:00
Julien Fortin
7bdf7072bd addons: bridge: add support for bridge-vids alias: bridge-trunk
Daniel: Having both bridge-vids and bridge-trunk at the
net add interface NAME <TAB>
level creates confusion… need to remove bridge-vids

This commit adds bridge-trunk as an alias for bridge-vids

Ticket: CM-14041
Reviewed By: Roopa, Nikhil G
Testing Done:

$ ifquery -a
auto bridge
iface bridge
      bridge-vlan-aware yes
      bridge-ports swp1 swp9
      bridge-trunk 2-100
      bridge-pvid 101
      bridge-stp on

$ ifrelaod -a
$ ifquery -a -c
auto bridge
iface bridge                                                        [pass]
      bridge-vlan-aware yes                                       [pass]
      bridge-ports swp1 swp9                                      [pass]
      bridge-stp yes                                              [pass]
      bridge-pvid 101
      bridge-trunk 2-100                                              []

$ ifquery -a -r
auto bridge
iface bridge
      bridge-vlan-aware yes
      bridge-ports swp9 swp1
      bridge-stp yes
      bridge-pvid 101
      bridge-vids 2-101

$ net show bridge vlan
port       vlan ids
swp1        2-100
             101 PVID Egress Untagged

swp9          2-100
               101 PVID Egress Untagged

bridge         None

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-08 07:38:35 +03:00
Julien Fortin
984146fb34 Merge branch 'dev' into dev-next 2017-01-08 05:40:26 +03:00
Julien Fortin
a9633d0591 addons: bond: add support for attribute aliases (bond-ports)
This features will allow attributes to have aliases. Our use case today is
between bond-slaves and bridge-ports, which be a little confusing.
It follows the kernel api and existing linux tools. Bonding driver calls them
slaves and to the bridge driver they are ports.

With NCLU we we would like to be more consistent. We will now also support
"bond-ports"a

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

$ ifquery -a -c
auto bond0
iface bond0                                                         [pass]
      bond-slaves swp1                                            [pass]

auto bond1
iface bond1                                                         [pass]
      bond-ports swp2                                             [pass]

root@cel-redxp-06:~# ifquery -a -r
auto bond0
iface bond0
      bond-lacp-bypass-allow 0
      bond-slaves swp1
      bond-mode 802.3ad
      bond-use-carrier 1
      bond-lacp-rate 1
      bond-min-links 1
      bond-miimon 100
      bond-xmit-hash-policy layer3+4

auto bond1
iface bond1
      bond-lacp-bypass-allow 0
      bond-slaves swp2
      bond-mode 802.3ad
      bond-use-carrier 1
      bond-lacp-rate 1
      bond-min-links 1
      bond-miimon 100
      bond-xmit-hash-policy layer3+4

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-06 17:58:49 +03:00
Julien Fortin
ac49bf0ec5 addons: bridge: warn/err if bridge-access is missing under vxlan bridge VA port
Ticket: CM-12235
Reviewed By: Roopa, Nikhil G
Testing Done:

$ ifquery vx br0
auto vx
iface vx
      vxlan-id 14567100
      vxlan-local-tunnelip 27.0.0.11
      mstpctl-portbpdufilter yes
      mstpctl-bpduguard yes
      mtu 1500

auto br0
iface br0
      bridge-stp off
      bridge-ports vx
      bridge-vlan-aware yes

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-06 05:20:10 +03:00
Roopa Prabhu
9858b0a680 ifupdown: add missing supporting code for 'link-down [yes|no]'
Ticket: CM-13434
Reviewed by: julien, nikhil, daniel
Testing Done: ifreload and multiple down [yes|no] sequences under
physical and logical interfaces (ifupdown2-tests test case is pending)

This also moves the fix done for CM-4125 (inet manual handling for
logical devices) into a single place under ifupdownmain.

attribute 'link-down [yes|no]' will not work in all cases when 'inet manual'
is used. This is only to preserve the semantics of 'inet manual'.
Best use of 'link-down [yes|no]' is to use it without 'inet manual'..
they are conflicting features anyways.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-05 11:28:16 -08:00
Roopa Prabhu
417e5675c4 addons: link: add new 'link-down [yes|no]' link attribute to keep link down
Ticket: CM-13434
Reviewed by: julien, nikhil, daniel
Testing Done: ifreload and multiple down [yes|no] sequences under
physical and logical interfaces (ifupdown2-tests test case is
pending)

This also moves the fix done for CM-4125 (inet manual handling for
logical devices) into a single place under ifupdownmain.

attribute 'link-down [yes|no]' will not work in all cases when 'inet
manual' is used. This is only to preserve the semantics of 'inet manual'.
Best use of 'link-down [yes|no]' is to use it without 'inet manual'..
they are conflicting features anyways.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-05 11:07:41 -08:00
Roopa Prabhu
f0e5bd8708 Revert "addons: address: add 'down' keyword to modinfo dictionary"
This reverts commit a21c63b65ca297ca6f23c919bbb74e58f9e04a07.

Moving this to link-down in link.py addon module..due to conflict
with usercmds.py

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-05 10:51:32 -08:00
Roopa Prabhu
81d3e0271e Revert "ifupdown: add new 'down [yes|no]' link attribute to keep link down"
This reverts commit 02e00f54bbf9d0ca647c1ed2c39f7af28b6653b7.

reverting this commit to move it to link.py addon module.
down conflicts with usercmds.py 'down'

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-05 10:50:48 -08:00
Roopa Prabhu
a21c63b65c addons: address: add 'down' keyword to modinfo dictionary
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-05 08:44:26 -08:00
Roopa Prabhu
02e00f54bb ifupdown: add new 'down [yes|no]' link attribute to keep link down
Ticket: CM-13434
Reviewed by: julien, nikhil, daniel
Testing Done: ifreload and multiple down [yes|no] sequences under
physical and logical interfaces (ifupdown2-tests test case is pending)

This also moves the fix done for CM-4125 (inet manual handling for
logical devices) into a single place under ifupdownmain.

attribute 'down [yes|no]' will not work in all cases when 'inet manual'
is used. This is only to preserve the semantics of 'inet manual'.
Best use of 'down [yes|no]' is to use it without 'inet manual'..
they are conflicting features anyways.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-05 08:30:11 -08:00
Julien Fortin
7a04fa917e addons: bridge: update bridge-access valid range (0 and 4095 are reserved)
Ticket: CM-14173
Reviewed By: Roopa, Daniel W, Nikhil G

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-04 19:54:42 +03:00
Julien Fortin
a4cf844858 addons: ethtool: update link speed valid values: add 25G and 50G
Ticket: CM-14122
Reviewed By: Roopa, Daniel W, Nikhil G

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-04 19:28:29 +03:00
Julien Fortin
0b1bea5bb3 addons: bridge: bridge-portmcfl: add support for yes/no value
Ticket: CM-14146
Reviewed By: Roopa, Daniel W, Nikhil G
Testing Done:

bridge-portmcfl attribute needs to validate an <interface-yes-no-0-1-list>
to support the yes/no syntax.
This is an incremental commit for CM-8866

$ ifquery -a
auto br0
iface br0
      bridge-ports swp1 swp2 swp3 swp4
      bridge-portmcfl swp1=yes swp2=no swp3=1 swp4=0

auto br1
iface br1
      bridge-vlan-aware yes
      bridge-ports swp5 swp6 swp7 swp8

auto swp5
iface swp5
      bridge-portmcfl yes

auto swp6
iface swp6
      bridge-portmcfl no

auto swp7
iface swp7
      bridge-portmcfl 1

auto swp8
iface swp8
      bridge-portmcfl 0
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-03 18:48:59 +03:00
Daniel Walton
291bdc04ec only ipv4 tunnel end points supported for Vxlan
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   roopa@cumulusnetworks.com

Ticket: CM-14197
2017-01-03 15:42:43 +00:00
Julien Fortin
b68a9ea541 addons: bridge: missing bridge-portmcrouter yes/no support under port
Ticket: CM-14199
Reviewed By: Roopa, Nikhil G, Daniel W
Testing Done:

$ cat /etc/network/interfaces
auto br0
iface br0
        bridge-ports swp1

auto swp1
iface swp1
        bridge-portmcrouter yes

$ ifreload -a
$ ifquery -a -c
auto br0
iface br0                                                           [pass]
      bridge-ports swp1                                           [pass]

auto swp1
iface swp1                                                          [pass]
      bridge-portmcrouter yes                                     [pass]

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-03 10:40:26 +03:00
Julien Fortin
2ff98bb9aa addons: address: purge ifalias when no alias keyword is provided
Ticket: CM-13044
Reviewed By: Roopa, Nikhil G, Daniel W,
Testing Done:

For some reason we can't simply write into a file when we want to purge the
ifalias, we have to exec a command. I wasn't able to make it work in any
other way.

add an alias to an interface, ifreload, ip link show interface
modify it, ifreload, ip link show interface
remove it, ifreload, ip link show interface

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-02 02:25:28 +04:00
Daniel Walton
100ab3ea0a 'address-virtual' needs to be multivalue
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   roopa@cumulusnetworks.com

Ticket: CM-14164
2016-12-29 16:29:20 +00:00
Julien Fortin
3fc3c01ba6 addons: address: purge ifalias when no alias keyword is provided
Ticket: CM-13044
Reviewed By: Roopa, Nikhil G, Daniel W,
Testing Done:

For some reason we can't simply write into a file when we want to purge the
ifalias, we have to exec a command. I wasn't able to make it work in any
other way.

add an alias to an interface, ifreload, ip link show interface
modify it, ifreload, ip link show interface
remove it, ifreload, ip link show interface

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-12-27 17:05:58 +01:00
Roopa Prabhu
2521bd83df addons: bridge: identify a bridge with bridge-ports or bridge-vlan-aware keywords
Ticket: CM-14158
Reviewed By: julien, nikhilg
Testing Done: Tested with a bridge config without bridge-ports line.

NCLU wants the ability to create a bridge without ports (to add them
later). Today we cannot specify an attribute without values. We get the
below error:
info: processing interfaces file /etc/network/interfaces
error: /etc/network/interfaces: line10: iface bridge: invalid syntax
'bridge-ports'

The error comes from a generic parser check...we will
need to add exceptions to the generic check if we allow attributes
without values.

This patch simply identifies a bridge by both the bridge-vlan-aware and
bridge-ports keyword. For vlan aware bridge it will simply work.
For old bridge driver nclu will have to specify 'bridge-vlan-aware no'
to achieve the same. nclu does not support old bridge
model today, so defering the old bridge driver discussion for later.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-12-21 23:13:10 -08:00