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

13 Commits

Author SHA1 Message Date
fc5e1735c0 ifupdown: add new ifupdownflags class to carry ifupdown flags
Ticket: cleanup
Reviewed By:
Testing Done: Tested ifupdown sanity

This gets rid of some ugly previous flag handling which was
passed through modules. This creates a global instance of
flags that all addon modules and helper modules can use.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-04-14 22:30:53 -07:00
16e30aab93 ifquery --running should not display link attributes unless they are different then defaults.
Ticket: CM-9995
Reviewed By: julien
Testing Done: Tested on amd64 hardnode

Right now, ifquery -r shows link speed, duplex and autoneg current running values.
This patch changes the behavior to not show link attributes unless they
differ then the defaults for that interface.
2016-03-22 15:53:05 -04:00
972026024f ifquery --check should not check default attributes when not requested
Ticket: CM-7938
Reviewed By: roopa
Testing Done: tested on amd64 cel-redxp box

If the user has not configured a link attribute,
we should not be checking it against the default config.
This will only confuse users into thinking link attributes
were configured.

Modifications to the ethtool.py addon module
to check of configs exist before checking them.
2016-03-10 10:33:13 -05:00
7444feea6d ifupdown2 should allow speed setting even with duplicate iface stanzas
Ticket: CM-6740
Reviewed By: roopa
Testing Done: tested multiple ifreloads with various test cases

In the case of duplicate iface stanzas where one of the stanzas sets
the link attributes, ifupdown2 was confused because the absence
of link attributes forced it to reset them to default values
(when they existed).

This patch tracks link changes and prevents resetting to defaults
only if there are no explicit settings configured.  Furthermore,
only the last interface processed (from the duplicates) will take
care of resetting to defaults.
2015-10-20 13:49:07 -04:00
7496605db3 ifupdown2 ethtool does not handle link-* settings on enslaved ports
Ticket: CM-7128
Reviewed By: Trivial
Testing Done: unit tested on Ken's machine

The ifupdown2 ethtool addon module fails to set/check
the link-speed on bridge ports.
I removed excessive ifaceLinkKind checking since CM-6619
(03642a9a) added BRIDGE_PORT and BOND_SLAVE.  This is ok
since we now check to see if ports have defaults (only swp do)
before showing or changing settings).
2015-08-20 23:12:26 -04:00
9fe90c103e ifupdown2 ethtool add-on module should not get unnecessary running configs for performance reasons
Ticket: CM-6630
Reviewed By: roopa
Testing Done: unit tested

We still run ethtool on most interfaces even if we don't have defaults to use.
The last bug I fixed (CM-6557) should have also fixed that (even if it was specific to
ifquery).

We now check if there is a configured attribute and if there is a default
value. If we do not have both, we continue without calling ethtool to get the running value.
2015-07-09 13:40:00 -04:00
8d60ab4163 ifquery --running should not show link attributes on logical interfaces
Ticket: CM-6557
Reviewed By: roopa, gospo
Testing Done: unit tested

ifquery should not show link attributes for interfaces we do not have defaults for.
Although somewhat useful, we don't want people saving the bond link attributes
to try to use then in a config
2015-07-02 15:59:34 -04:00
d2431a3dbf Eliminate confusing and unnecessary ethtool calls
Ticket: CM-6275
Reviewed By: roopa,dustin
Testing Done: Unit tested and ran complete ifupdown2 test suite

There are unnecessary calls to the ethtool module that cause some error messages to be printed.
We currently don't check ifaceobj.link_kind at the start
so this check was added.

If someone creates a new interface without setting link_kind, we still printed error message.
This patch adds a check at the start of ethtool.

This patch also removes the global link defaults (used by ifupdown2/ethtool)
created when update-ports is called.  The defaults are created for each swp port
so we don't have defaults (and therefore will not attempt to set) for interfaces
like eth0, loopbacks, dummys, vxlans, or any other non swp interface.
2015-06-19 21:27:49 -04:00
3d44fbd0c9 Add default link parameter support for ethtool module
Ticket: CM-5254
Reviewed By: roopa
Testing Done: tested master and 2.5_br images with testifupdown2 suite and hand tested

This patch creates a json defaults file upon bootup
(which can be overridden by customer configs in /etc)
which the ethtool module in ifupdown2 will consult
when "link-x" configs are removed in order to restore
them to the initial settings used by the switch.
(cherry picked from commit 8388664f5a5a85f2a813cafbf40ac92d7b86f4bf)

Conflicts:
	packages/cl-utilities/usrlib/update-ports
(cherry picked from commit 21c9c10ab2fccaf60be9accb337e82541d497cc4)
2015-06-04 15:27:48 -04:00
8e113d6319 misc query and fdb/vlan add fixes
Ticket: CM-3346
Reviewed By:
Testing Done: ifupdown2 sanity
2014-11-03 17:55:51 -08:00
84ca006f82 First phase checkin for new format for vlan aware bridge
Ticket: CM-3346
Reviewed By:
Testing Done: Sanity test + test new bridge format

There are a bunch of open issues with `vlan` interface handling.
Below is the format.

auto swp1
iface swp1
    bridge-access 300
    mstpctl-pathcost 0
    mstpctl-adminedge yes
    mstpctl-autoedge yes
    mstpctl-p2p yes
    mstpctl-bpduguard yes
    mstpctl-treeprio 64
    mstpctl-network yes
    mstpctl-bpdufilter yes

auto swp2
iface swp2
    bridge-vids 301
    bridge-pvid 302
    bridge-pathcost 10
    bridge-priority 10
    bridge-multicast-router 0
    bridge-multicast-fast-leave 1

auto br0
iface br0
    bridge-vlan-aware yes
    bridge-stp on
    bridge-ports swp1 swp2
    bridge-vids 2001

auto br0.2001
iface br0.2001
    address 10.0.14.2
    hwaddress 00:03:00:00:00:12
    address-virtual 00:00:5e:00:01:01 11.0.4.1/24

auto br0.2001
vlan br0.2001
    bridge-igmp-querier-src 172.16.101.1
2014-10-24 10:11:07 -07:00
e74d01e1b2 Add rtnetlink api's for link creates
Ticket: CM-3346
Reviewed By:
Testing Done:
2014-10-12 13:50:05 -07:00
15ef32ea14 Move ifupdown2addons into ifupdown2 pacakge
Ticket: CM-3864
Reviewed By:
Testing Done: Tested build and install

open item:
- cleanup stale ifupdown2-addons package files
2014-10-09 16:02:46 -07:00