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

15 Commits

Author SHA1 Message Date
d486dd0df0 ifupdown2 2.0.0 release
This is a major update coming all at once from master-next branch
master-next branch was started with --orphan option which is basically a new
branch without history.

The major changes are:
    - repackaging
    - cleanup the directory tree
    - rewritte setup.py to allow install from deb file or pypi (pip install)
    - add a Makefile to make things (like building a deb) easier
    - review all debian files

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 11:43:32 -08:00
ff50f301d5 move ifupdown2/* .
ifupdown2 code was one level deeper because ifupdown2 initially
had ifupdown2 and ifupdown2-addons as two separate packages.
Since they were combined into one package, it makes sense to
move all combined code under the top level directory

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2015-08-02 05:05:52 -07:00
6b14b64e62 Fixed new file addition breakage with 0b762139
This patch moved policymanager.py and python-ifupdown2.preinst
to their correct locations.   A previous patch incorrectly added
these files to the wrong path.
2015-06-22 13:07:00 -04:00
4fc71247f8 Don't allow IP addresses on ports enslaved in bonds or bridges
Testing Done: built new ifupdown package and ran testifupdown2 suite of tests

This patch prevents enslaved interfaces from having IP addresses.
(cherry picked from commit 0c00606fbc76db11557a8e946310e93a2b376aa7)
2015-06-03 13:20:10 -04:00
0b762139c6 Add default link parameter support for ethtool module
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/dist-packages/cumulus/portconfig.py
	packages/cl-utilities/usrlib/update-ports
	tests/tests/smoke/testifupdown2.py
2015-06-03 13:15:49 -04:00
37592fc188 Dont down an interface during ifreload just because the number of iface
sections for that interface changed

Testing Done: tested ifreload with new iface section

problem stmt:
if the user adds a new section for an existing interface, I mark the
interface for down.
Basically the below:

               if len(newifaceobjlist) != len(lastifaceobjlist):
                    ifacedownlist.append(ifname)
                    continue

You rarely need to add a new section to the interfaces file. It is not
recommended even by the user guide.
sankaran was trying to add a new address. Which he could have added to
the same iface section.

But, looking at his trivial example, i am thinking of not marking an
interface for down if the user merely tried to add a new section to an
existing interface
(cherry picked from commit 65c62c02981cf6e2677b18c0aafcb3f2bd737b1b)
(cherry picked from commit 4453b1921fc3f8e959131cb5e1b9e79e0433cc08)
2015-06-03 13:13:13 -04:00
f213551e88 add new ifupdown2.conf option ifreload_down_changed to control ifreload
ifdown behaviour.

Testing Done: tested ifreload evo test case

ifreload_down_changed is 0 by default which will make
sure ifreload will not execute down on changed interfaces
but only on deleted interfaces making it non-disruptive.

some notes from CCR:

ifreload was designed to be an optimization for 'service networking
restart' or 'ifdown -a + ifup -a'.
essentially it is a combination of 'ifdown + ifup' with some smarts in
which interfaces it will execute ifdown on.

By default it does the below:
ifdown all interfaces that were deleted from the interfaces file
ifdown all interfaces that were changed from the last time they were
ifup'ed
ifup -a (execute ifup on all interfaces marked auto)

Did not realize people will use ifreload as much as they do today. Also,
they may execute it on a production box when changes are made. ifdown on a production box can be
disruptive because if the ifdown which is part of the ifreload.

To have a non-disruptive option to ifreload, 2.5 added a new option -c
that only executed 'ifup' on all interfaces. Thus reloading all auto +
any other interfaces that were once brought up on the box (essentially
all interfaces present in the saved state file). This by default did not
do anything to the interfaces that got deleted from the file. But had an
ifupdown2.conf toggle to do so.

Looking at the evo use case, they do want to use a single command that
modifies, adds, deletes with
minimum disruption. we can achieve maybe what they want with multiple
commands (But there is also a case of a bug in the build evo is running
which makes it not so easy ).

This patch fixes the bug and also tries to change the default ifreload
behaviour controllable via a variable in ifupdown2.conf.
when ifreload_down_changed=0 in ifupdown2.conf, ifreload will only
ifdown interfaces that were deleted
from the file but not the ones that changed. subsequent ifup as part of
ifreload on the interfaces
that changed will apply the delta. And ifreload_down_changed default
value is '0'.

WIth the patch, ifreload by default will do the below (going back to the
previous default is just a toggle in the ifupdown.conf file):
ifdown all interfaces that were deleted from the interfaces file
ifup -a (execute ifup on all interfaces marked auto)

It sounds like a big change of behaviour for a hotfix release, but
essentially the patch just moves a few things around. And the change in
behaviour is so subtle that it is not very visible.
It just makes it non-disruptive.
(cherry picked from commit 2f7977834d4912a69159d27e54ba201f58a321d8)
(cherry picked from commit 09f283009e7de62ef1d258de81c94cc86fa13323)
(cherry picked from commit 898562e0e2284ccdc201dafc62b25b928037e0c6)
2015-06-03 13:10:13 -04:00
652636b240 rework error message
Testing Done: tested interfaces file with shared dependents
(cherry picked from commit 671535a300f366cf690cf96b6ad667c66db22497)
(cherry picked from commit b2c1cffa2ea6740eceacde57d59449057c6bcb82)
2015-06-03 13:09:46 -04:00
faaa176eed Add check for shared dependents during building dependency list
Testing Done: Tested with shared slaves in bridge and bonds
(cherry picked from commit 6f990450001d367a775681a29cdce74f862f7848)
(cherry picked from commit 8d9a5107112628ee8434e227dff49a0ef09966ee)
2015-06-03 13:08:58 -04:00
3ac88e1553 Dont follow dependents during down of interfaces as part of ifreload
Testing Done: tested ifreload with example in the bug

ifdown of the bridge svi was following the lowerdev and downing the
bridge. kernel implicitly deletes all svi's on bridge down.
ifup of the bridge usually handles it, but a change done in 2.5.1
was causing it not to. Thinking about this some more, its safe
to not follow dependents on down during a ifreload. This patch does
just that.
(cherry picked from commit 03f7a376aee944b4037b7b7b02a5096e9360f79e)
(cherry picked from commit aac5777ecc7d367ada0681f813fbec7f78fa80ee)
2015-06-03 13:08:10 -04:00
f7e2962a92 ifupdown2 loses interfaces on second down of swp port
Testing Done: tested bridge and bonds with interfaces with configs

Both bridge and mstpctl modules set priv_flags on interfaces
that have configs (like link-speed) even when used as bridge-ports.
And this collision causes statemanager.ifaceobj_sync() to never get called
because ifaceobj.priv_flags is 1 (we return immediately):
The fix was to create a new iface module_flags array to carry module info.
(cherry picked from commit 56924fef20984fd959939bf7f17c3dd6fd6b137a)
(cherry picked from commit 28d96f7643e2885b1f9c17ad9324a6dbb1b0f8c7)
2015-06-03 13:06:54 -04:00
f8e2f6e283 Add config len check to iface compare
Testing Done: Tested ifreload with steps in the bug
2015-06-03 13:05:16 -04:00
f8646c3728 Correct error message for unsupported ifupdown2 attributes
Corrected a minor error in how we handle unsupported config attributes.
Instead of

     error: not enough arguments for format string

we will now print this:

     warning: peerlink.4000: unsupported attribute 'clagd-foobar'
(cherry picked from commit 44c6004a33d59ee234f8ee3d5f450e158c9e5bdc)
(cherry picked from commit f2c2321301d05e88d3c9ab9c26e6d4e256c884e9)
2015-03-16 13:44:27 -04:00
f82758bf2c Merge 'vlan filtering bridge + vxlan + mlag + vrr' support from internal
tree to external

This also combines python-ifupdown2 and python-ifupdown2-addons package
into a single python-ifupdown2 package
2015-03-06 21:46:10 -08:00
2c8c4ce74d Initial import of ifupdown2 sources 2014-07-20 00:45:04 -07:00