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

173 Commits

Author SHA1 Message Date
89aa6573d6 Fix use of args.CLASS with ifreload (reload does not support CLASS yet).
Ticket: CM-3176
Reviewed By: trivial
Testing Done: Tested ifreload with the testcase in the bug

This broke when i recently fixed --allow-classes support for ifup/ifdown
2014-07-14 22:29:05 -07:00
0bb5110d65 Fix error flag for cases where errors are ignored (part of commit
3afb698d60a7ec0bb3029efccc82c0bd1aa49197)

Ticket: CM-2960
Reviewed By:
Testing Done: ifupdown2 sanity + precommit
2014-07-14 22:28:54 -07:00
1104a8609e exit with non-zero return code if any of the ifaces have errors
Ticket: CM-2960
Reviewed By:
Testing Done: ifupdown2 sanity + error cases + precommit

uses a class variable to store return value
2014-07-14 22:28:44 -07:00
1d787a1775 Fix splits everywhere to include space and tabs. Use regex split
Ticket: CM-3121
Reviewed By:
Testing Done: Ran precommit
2014-07-14 22:28:34 -07:00
e2021a9531 Fix handling of interfaces with --allow CLASS
Ticket: CM-3105
Reviewed By:
Testing Done: precommit and some interface class tests

- the patch mostly involves code reorg
2014-07-14 22:28:24 -07:00
ee9d01f724 Fix scheduler for --allow <classes> option
Ticket:
Reviewed By: nobody
Testing Done: Tested --allow <classes>
2014-07-14 22:28:10 -07:00
899867676a Fix return value when upperifaces are brought up
Ticket: CM-3208
Reviewed By:
Testing Done: Tested with testcase listed in the bug

This patch does the following:
- moves the interface error exit check to before upperifaces are brought
  up
- changes errors to warns on upperiface error (this is because
  upperiface 'up' is done as best effort to reconfigure the interface in
  question as slave device to the upper device. But if the upper device
  is not in a right state config steps can fail. And we should just
warn).
- Implicitly bringing up the upperifaces helps in most of the cases. especially
  when a bond is brought down and up. The upperiface handling code adds
  the bond back into bridges it was part of. or creates the vlan devices
  on the bond that got deleted. But there can be cases where upperifaces are
  not in the right state and this results in warnings.

  To disable the implicit upperiface handling, this patch also supports
  'skip_upperifaces=1' in /etc/network/ifupdown2/ifupdown2.conf

in future, i am thinking of an option --skip-upperifaces to ifup
2014-07-10 21:08:21 -07:00
1e5abf8afa log /etc/init.d/networking errors into syslog using /usr/bin/logger
Ticket: CM-3193
Reviewed By:
Testing Done: Tested logging of errors in syslog from ifup at bootup

Example error msg:
"Jul 10 03:13:17 cumulus /etc/init.d/networking[1183]: error:
/etc/network/interfaces: line16: invalid auto line 'auto'"

This patch logs into syslog only during bootup
2014-07-09 20:23:21 -07:00
5c15a69758 Add a new ifupdown2 example to cover bridge igmp and mstp attributes
Ticket: CM-1438
Reviewed By: TBD
Testing Done: Tested the example file with ifupdown2
2014-07-09 14:14:14 -07:00
549d927306 Bump kernel ethtool get/set wait to 20 + ifupdown2 convert ethtool
errors to warns

Ticket: CM-3159
Reviewed By: briefly ran this by jtoppins and andy (sfeldma is on
vacation this week).
Testing Done: tested ifupdown2 with ethtool config during boot (sam will
also be adding the testcase mentioned in the bug to ifupdown2 smoke)

The kernel timeout increase helps right now.
we should revisit this again in 2.3 to close all corner cases.

ifupdown2 will now warn on ethtool errors and will also return
non-zero exit status
2014-07-08 08:52:05 -07:00
22498b571c Fix use of args.CLASS with ifreload (reload does not support CLASS yet).
Ticket: CM-3176
Reviewed By: trivial
Testing Done: Tested ifreload with the testcase in the bug

This broke when i recently fixed --allow-classes support for ifup/ifdown
2014-07-07 11:30:52 -07:00
8d3fdd7cd5 Merge branch 'CumulusLinux-2.1.0_release_br' into CumulusLinux-2.1_br
Conflicts:
	build-config/conf/version
	build-config/make/kernel.make
	packages/cafe/clobjects.py
	patches/bcm-sdk/dma-debug.patch
	patches/kernel/series
	tests/l3/l2_l3_lag_test.py
	utilities/distro-cmd
	utilities/packages/autolib/netobjects.py
2014-07-07 09:10:31 -07:00
396b5f7f0b Fix error flag for cases where errors are ignored (part of commit
3afb698d60a7ec0bb3029efccc82c0bd1aa49197)

Ticket: CM-2960
Reviewed By:
Testing Done: ifupdown2 sanity + precommit
2014-07-03 14:43:26 -07:00
851e79981c exit with non-zero return code if any of the ifaces have errors
Ticket: CM-2960
Reviewed By:
Testing Done: ifupdown2 sanity + error cases + precommit

uses a class variable to store return value
2014-07-02 10:03:02 -07:00
124c912758 Fix splits everywhere to include space and tabs. Use regex split
Ticket: CM-3121
Reviewed By:
Testing Done: Ran precommit
2014-06-27 23:51:24 -07:00
d22c46d3a0 Fix splits everywhere to include space and tabs. Use regex split
Ticket: CM-3121
Reviewed By:
Testing Done: Ran precommit
2014-06-27 23:44:36 -07:00
f88d1c26bf Fix handling of interfaces with --allow CLASS
Ticket: CM-3105
Reviewed By:
Testing Done: precommit and some interface class tests

- the patch mostly involves code reorg
2014-06-25 15:23:04 -07:00
df883c45e2 Merge branch 'CumulusLinux-2.1.0_release_br' into CumulusLinux-2.1_br
Conflicts:
	packages/cafe/commands/vxlan_lib.py
	packages/cl-utilities/bin/cl-ns-mgmt
	switchd/sync.c
2014-06-18 11:23:55 -07:00
16f606e2f8 Fix scheduler for --allow <classes> option
Ticket:
Reviewed By: nobody
Testing Done: Tested --allow <classes>
2014-06-14 22:53:23 -07:00
fc2f667293 Fix whitespace issue + uninitialized variable issue
Ticket: CM-2997
Reviewed By: shm
Testing Done: Ran precommit
2014-06-14 22:35:30 -07:00
20534d1bdf Fix upperiface check when ifdown is run with -a
Ticket: CM-3007
Reviewed By: shm + patch was pasted in the bug for review
Testing Done: ran precommit + maliks test + malik ran his test on his
box

When -a is specified ifupdown2 works on all interfaces and since the the
upperiface check is a bit expensive i had a "skip" on that.
And so far all the user commands i have seen only work on the $IFACE and
not its dependents. So, never hit this case.
2014-06-14 22:35:17 -07:00
394d1ea70b Fix whitespace issue + uninitialized variable issue
Ticket: CM-2997
Reviewed By: shm
Testing Done: Ran precommit
2014-06-13 06:15:40 -07:00
e33322aa87 Fix upperiface check when ifdown is run with -a
Ticket: CM-3007
Reviewed By: shm + patch was pasted in the bug for review
Testing Done: ran precommit + maliks test + malik ran his test on his
box

When -a is specified ifupdown2 works on all interfaces and since the the
upperiface check is a bit expensive i had a "skip" on that.
And so far all the user commands i have seen only work on the $IFACE and
not its dependents. So, never hit this case.
2014-06-13 06:08:40 -07:00
1fa6a56c43 prefix ethtool attributes with "link-" to be compatible with
native ifupdown + documentation fixes

Ticket: CM-3000
Reviewed By: trivial + doc related
Testing Done: Ran precommit
2014-06-12 11:53:12 -07:00
c5a54d7376 prefix ethtool attributes with "link-" to be compatible with
native ifupdown + documentation fixes

Ticket: CM-3000
Reviewed By: trivial + doc related
Testing Done: Ran precommit
2014-06-12 06:27:29 -07:00
51a8099130 Fix typo
Ticket: CM-2911
Reviewed By: pbendale
Testing Done:
2014-06-12 06:05:40 -07:00
522bf8e68b Fix bash completion for sudo users (mostly cosmetic) + man page and
example fixes

Ticket: CM-2911
Reviewed By: CCR-1637
Testing Done: tested ifupdown2 sanity and bash completion

The python argcomplete module that i use for ifupdown2 has a limitation
that it does not work with sudo when used in the global mode. But there is
a workaround for it online (long story short...instead of enabling the global
argparse complete ...the author recommends registering argparse complete bash
completion individually for your script). This patch does just that.

This patch also moves the udev overrides to their respective packages.
Two of them are owned by ifupdown2.

Conflicts:
	rootconf/default/home/cumulus/sysroot-complete
2014-06-10 19:31:50 -07:00
ba7064c6b1 Fix typo
Ticket: CM-2911
Reviewed By: pbendale
Testing Done:
2014-06-07 08:14:10 -07:00
898c8214d8 Fix bash completion for sudo users (mostly cosmetic) + man page and
example fixes

Ticket: CM-2911
Reviewed By: CCR-1637
Testing Done: tested ifupdown2 sanity and bash completion

The python argcomplete module that i use for ifupdown2 has a limitation
that it does not work with sudo when used in the global mode. But there is
a workaround for it online (long story short...instead of enabling the global
argparse complete ...the author recommends registering argparse complete bash
completion individually for your script). This patch does just that.

This patch also moves the udev overrides to their respective packages.
Two of them are owned by ifupdown2.
2014-06-06 23:00:24 -07:00
ab2ca747fc Add close_fds=True in ifupdownbase class
Ticket: CM-2899
Reviewed By:
Testing Done: Tested ifupdown sanity

Just closing all the places where we could leak fds.
2014-06-03 11:11:47 -07:00
3e95a3dab5 Use closefds=True and shell=True when executing usercmds
Ticket: CM-1438
Reviewed By: reported by purna
Testing Done: Tested with purna's l2 l3 lag test

problem fixed by this patch:
In some cases the child processes executing user cmds seem to hold on to
the lock file fd for a lil longer, preventing another instance of
ifupdown from running immediately after. Seen with two immediate
instances of service networking restarts from scripts when the
interfaces file has many user cmds.
2014-06-01 12:17:40 -07:00
4c399f5562 Fix query-check object for interfaces with multiple iface sections
Ticket: CM-1438
Reviewed By:
Testing Done: ifupdown2 sanity
2014-06-01 12:17:23 -07:00
69cf2f0de7 Use closefds=True and shell=True when executing usercmds
Ticket: CM-1438
Reviewed By: reported by purna
Testing Done: Tested with purna's l2 l3 lag test

problem fixed by this patch:
In some cases the child processes executing user cmds seem to hold on to
the lock file fd for a lil longer, preventing another instance of
ifupdown from running immediately after. Seen with two immediate
instances of service networking restarts from scripts when the
interfaces file has many user cmds.
2014-06-01 11:12:06 -07:00
44a6ca06b7 Fix query-check object for interfaces with multiple iface sections
Ticket: CM-1438
Reviewed By:
Testing Done: ifupdown2 sanity
2014-05-31 21:52:16 -07:00
dbba401f4d remove native ifupdown support from bridge-utils, vlan, ifenslave and
mstpctl + some ifupdown2 documentation cleanup

Ticket: CM-1438
Reviewed By:
Testing Done: ifupdown2 sanity testing

Conflicts:
	patches/bridge-utils/series
2014-05-29 15:45:55 -07:00
35c868a096 remove native ifupdown support from bridge-utils, vlan, ifenslave and
mstpctl + some ifupdown2 documentation cleanup

Ticket: CM-1438
Reviewed By:
Testing Done: ifupdown2 sanity testing
2014-05-29 12:43:03 -07:00
3754bb5ae8 Fix bug during handling multiple iface sections for same interface
Ticket: CM-1438
Reviewed By:
Testing Done: Tested ifupdown2 sanity + multiple iface sections for an
interface

- This patch fixes a few shortcomings in the multiple iface sections
for same interface (partly because i was only covering
backward compatibility cases earlier)
- Since this is a very common configuration pattern, this patch cleans
  it up
- also restructures some code
- main change is:
    before:
        for iface in ifaces:
            for op in ops:
                run op on iface

    after:
        for op in ops:
            for iface in ifaces:
                run op on iface
2014-05-26 09:14:45 -07:00
923290bd42 Fix bug during handling multiple iface sections for same interface
Ticket: CM-1438
Reviewed By:
Testing Done: Tested ifupdown2 sanity + multiple iface sections for an
interface

- This patch fixes a few shortcomings in the multiple iface sections
for same interface (partly because i was only covering
backward compatibility cases earlier)
- Since this is a very common configuration pattern, this patch cleans
  it up
- also restructures some code
- main change is:
    before:
        for iface in ifaces:
            for op in ops:
                run op on iface

    after:
        for op in ops:
            for iface in ifaces:
                run op on iface
2014-05-26 09:03:29 -07:00
6449f09497 Update/add copyright files for Cumulus .debs. 2014-05-23 15:37:10 -07:00
4931e447fe Update/add copyright files for Cumulus .debs. 2014-05-23 15:32:53 -07:00
9cc481ac8c Move interfaces example generation script to under
/usr/share/python-ifupdown2

Ticket: CM-2643
Reviewed By:
Testing Done: Tested ifupdown2 sanity
2014-05-21 12:46:05 -07:00
31358310de Add examples and script to generate sample interfaces file
Ticket: CM-2643
Reviewed By:
Testing Done: Tested build/install

This also pulls in python-gvgen package from wheezy sid into our
upstream dir. Previously i had packaged the gvgen module directly
into the ifupdown package
2014-05-21 12:45:46 -07:00
93e8319a1f Move interfaces example generation script to under
/usr/share/python-ifupdown2

Ticket: CM-2643
Reviewed By:
Testing Done: Tested ifupdown2 sanity
2014-05-21 12:39:30 -07:00
883f7f83f2 Add examples and script to generate sample interfaces file
Ticket: CM-2643
Reviewed By:
Testing Done: Tested build/install

This also pulls in python-gvgen package from wheezy sid into our
upstream dir. Previously i had packaged the gvgen module directly
into the ifupdown package
2014-05-19 07:00:12 -07:00
86fc62e20c make a few things configurable (check output err/success string +
warnings on ifupdown)

Ticket: CM-1438
Reviewed By:
Testing Done: Tested ifupdown2 sanity

Some of the above mentioned configurable items can be specified in
ifupdown2.conf
2014-05-09 09:10:49 -07:00
615234a10d make a copy of the indegrees dict in the graph module
Ticket: CM-2731
Reviewed By:
Testing Done: Tested ifupdown sanity

The graph module modifies the indegrees array and so introduce a copy
of the dict before modifying it.
2014-05-07 23:20:04 -07:00
f90dd03886 Fix stray call to dict which was converting my ordered dict to an unordered dict
Ticket: CM-2731
Reviewed By:
Testing Done:

This was resulting in eth0 missing its first spot during interface
bringup
2014-05-07 22:48:29 -07:00
31c5878750 Change mstpctl show output parsing code (Use mstpctl show using
param-id). Its less prone to problems.

Ticket: CM-1438
Reviewed By:
Testing Done:

- Also add bpdufilter support
- This also gets rid of caching for mstpctl output
2014-05-05 13:39:00 -07:00
65c485175b include only interfaces with no config in the upperiface check
Ticket: CM-1438
Reviewed By:
Testing Done: sanity and ifdown on bridges with vlans that dont have
user config
2014-05-02 08:10:59 -07:00
99b212b016 Bring back upperiface check during down (One of my recent checkins had
removed it)

Ticket: CM-2671
Reviewed By:
Testing Done: Tested test case in CM-2671 and ifupdown2 sanity
2014-04-29 21:45:57 -07:00