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
08179c9d2e state manager test
Ticket:
Reviewed By:
Testing Done:
2014-03-27 16:53:32 -07:00
91067b3d23 Remove batch support when deleting addresses. batching code does not
update the cache yet and that can cause problems during add

Ticket: CM-2491
Reviewed By:
Testing Done:

Still working on the cache update support during batching.
2014-03-27 16:36:54 -07:00
ca3f4fc75a Remove upper device check warnings + implicitly follow upperifaces when
a logical interface comes up

Ticket: CM-2493
Reviewed By:
Testing Done: Tested ifup, ifdown in bond bridge setup

Also, implicitly pick up the upperifaces (even when user has not
specified --with-depends) for logical interfaces.
This is because when a logical interface goes down/deleted, kernel
impilicity deletes its upperifaces. so its better to implicitly bring
up upperifaces.

example

bridge name    bridge id        STP enabled    interfaces
br0        8000.7072cf8c2fca    yes        bond1
                            bond2
br2000        8000.7072cf8c2fca    yes        bond1.2000
                            bond2.2000
br2001        8000.7072cf8c2fca    yes        bond1.2001
                            bond2.2001

bridge name    bridge id        STP enabled    interfaces
br0        8000.000000000000    yes
br2000        8000.000000000000    yes
br2001        8000.000000000000    yes

bridge name    bridge id        STP enabled    interfaces
br0        8000.7072cf8c2fca    yes        bond1
                            bond2
br2000        8000.7072cf8c2fca    yes        bond1.2000
                            bond2.2000
br2001        8000.7072cf8c2fca    yes        bond1.2001
                            bond2.2001
2014-03-27 14:00:00 -07:00
53b0022499 cleanup + fixes
Ticket: CM-1438
Reviewed By:
Testing Done: Tested ifupdown sanity
2014-03-25 15:21:19 -07:00
fa3da4be43 Only warn on ifdown of an interface who has upperifaces still around +
cleanup

Ticket: CM-1438
Reviewed By:
Testing Done: Tested ifup/ifdown sanity
2014-03-24 06:28:08 -07:00
62ddec8b52 cleanup (mostly cosmetic)
Ticket: CM-1438
Reviewed By:
Testing Done: sanity test
2014-03-22 22:16:53 -07:00
c798b0f4aa execute 'up' on upper devices if ifup is called with --with-depends
Ticket: CM-1438
Reviewed By: review pending
Testing Done: Tested ifup/ifdown

Before this patch, `ifup --with-depends <iface>` only brought up
lowerdevices. Because those were enough for iface to function.

And if ifaces above it (upperdevices) needed fixing, user could just
execute `ifup --with-depends <ifaceupper>`.

But in a recent, bond under a bridge bug in 2.0, got me thinking that
its probably better to up the upperdevices which might be impacted as
well. and this patch does just that.

The patch includes changes to make ifupdown generate dependency
information for all interfaces even if the user requested to operate
on a single interface. This is to get a full view of the interfaces file.
This might add some overhead. Should not change anything during boot.
Still looking at ways to optimize.
2014-03-18 16:38:00 -07:00
dab8d81ec7 Remove dead code
Ticket: CM-1438
Reviewed By: trivial
Testing Done: Tested ifup/ifdown
2014-03-17 06:38:55 -07:00
e6c9d00704 Add bash completion support using python-argcomplete
Ticket:
Reviewed By:
Testing Done: Tested bash completeion for cl-acltool and ifupdown

Caveat: It also completes hidden options.
2014-03-13 12:06:18 -07:00
21c7daa773 Fix upperiface check to not barf when --force is used
Ticket: CM-2366
Reviewed By: trivial
Testing Done: Tested ifup/ifdown with bonds and bridges

Also refactored some code.
2014-03-06 14:37:28 -08:00
5c72192578 A few state manager optimizations + and some other fixes
Ticket: CM-1438
Reviewed By:
Testing Done:

This also fixes a bug with address handling:
- If the user changed a primary address, flush all the addresses and
  re-add them. Previously, if user added a new primary address, it would
ust get appended to the end of the address list as a secondary address.
2014-03-06 06:41:28 -08:00
a690dfae1b ip batch support for mstp bridges + add support for multiple globs in a
single port expression + cleanup

Ticket: CM-1438
Reviewed By:
Testing Done:

This has left some dead code in. cleanup comming in subsequent patches.
ip batch support is not complete. It currently works only for mstpctl
bridges. more coming ..
2014-02-27 22:23:03 -08:00
20dd6242f6 ifudown --no-scripts support
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-02-26 08:09:44 -08:00
03964dc48d revert accidental checkin: ifup with debug option in
/etc/init.d/networking

Ticket: CM-1438
Reviewed By:
Testing Done:
2014-02-24 21:17:19 -08:00
31a5f4c364 cleanup state manager + remove some dead code
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-02-24 11:07:59 -08:00
e938bfeccd workaround to fix dhcp delay at bootup
Ticket: CM-2317
Reviewed By:
Testing Done:

still investigating the iproute delay.
2014-02-20 13:11:22 -08:00
6bd7fc7466 Disable exec of legacy /etc/network/<scripts> for now because of the
overhead

Ticket: CM-1438
Reviewed By:
Testing Done:

These are executed with shell=True and python subprocess performance
with shell=True sucks. This seems to have improved in python3. Will try
that out next. And also plan to make this controllable via an option.

This reduces time to ifup by half.
2014-02-20 09:07:55 -08:00
fe0a57d355 remove dhclient -nw option + cleanup
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-02-19 21:30:55 -08:00
69f582783b Fixes for some corner cases + cleanup
Ticket: CM-1438
Reviewed By:
Testing Done:

Also includes fix for CM-2307 and some other fixes for primary/secondary
address handling.
2014-02-18 22:25:48 -08:00
be0b20f288 Support for manual method + rearrange some code
Ticket: CM-1438
Reviewed By:
Testing Done:

- Moved link config to base ifupdown. I had been debating about this,
  this is need to support manual and also the --no-scripts option.
- helps executing only link up/down operations if needed on an interface
- While at it, i also moved the scheduler methods to be classmethods
  instead of instance methods (which again was a pending cleanup task)
2014-02-17 19:01:37 -08:00
83c1f241fd minor fixes + cleanup + update manpage
Ticket: CM-1438
Reviewed By:
Testing Done:

- simplified the dot generator
2014-02-15 21:39:13 -08:00
0ff44a76ac Fix build failure
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-02-14 11:13:09 -08:00
e37ad4a607 cleanup, documentation and enable ifupdown2 by default
Ticket: CM-1438
Reviewed By:
Testing Done:

There are a few known issues listed in the TODO and KNOWN_ISSUES files
2014-02-14 09:55:19 -08:00
f802fe3ccb cleanup and some documentation
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-02-13 21:37:26 -08:00
f321512771 Fix l3 lag test failure
Ticket: CM-1438
Reviewed By:
Testing Done: l3 lag test with help from purna

- THe down sequence in the new ifupdown was causing switchd some grief
  (wilson is looking at it). readded the topological sort which i had
removed in favor of only walking the tree. With the fix,i dont see the
switchd problem anymore.
- And another down bug was causing the bond to go away prematurely (only
  with the all depends option). Added a upperdevice list to track upperdev references
2014-02-12 22:29:41 -08:00
e176f1d459 Merge branch 'CumulusLinux-2.0_br'
Conflicts:
	build-config/conf/snapshot-manifest-powerpc
	build-config/make/kernel.make
	modules/accton_as5610_52x_cpld.c
	packages/cl-platform-config/usr/share/platform-config/accton/as5610_52x/etc/bcm.d/default_config_values
	packages/cl-platform-config/usr/share/platform-config/accton/as5610_52x/hw_init.d/S10gpio_init.sh
	packages/cl-utilities/dist-packages/cumulus/platformdb.py
	packages/cl-utilities/dist-packages/cumulus/platforms/accton.py
	packages/ifupdown2-addons/addons/bridge.py
	packages/ifupdown2-addons/addons/ifenslave.py
	packages/ifupdown2-addons/addons/inet.py
	packages/ifupdown2-addons/addons/inet6.py
	packages/ifupdown2-addons/addons/mstpctl.py
	packages/ifupdown2-addons/addons/vlan.py
	packages/ifupdown2-addons/pkg/base.py
	packages/ifupdown2-addons/pkg/bridgeutils.py
	packages/ifupdown2-addons/pkg/cache.py
	packages/ifupdown2-addons/pkg/ifenslaveutil.py
	packages/ifupdown2-addons/pkg/iproute2.py
	packages/ifupdown2-addons/pkg/modulebase.py
	packages/ifupdown2-addons/pkg/mstpctlutil.py
	packages/ifupdown2/TODO
	packages/ifupdown2/init.d/networking
	packages/ifupdown2/pkg/graph.py
	packages/ifupdown2/pkg/iface.py
	packages/ifupdown2/pkg/ifupdownmain.py
	packages/ifupdown2/pkg/networkinterfaces.py
	packages/ifupdown2/pkg/scheduler.py
	packages/ifupdown2/sbin/ifupdown
	patches/kernel/driver-ds100df410-retimer.patch
	patches/kernel/platform-accton-as5610_52x.patch
	patches/kernel/platform-cel-p2020.patch
	patches/kernel/platform-powerpc-85xx-Makefile.patch
	patches/kernel/platform-quanta-ly6-p2020.patch
	patches/kernel/series
	patches/mstpd/igmp_snooop_ifupdown.patch
	patches/mstpd/series
	patches/quagga/series
	switchd/debian/switchd.default
	switchd/hal_acl_bcm.c
	switchd/hal_bcm.h
	switchd/switchd.c
2014-02-11 14:12:16 -08:00
360d5f8eac rename a few options
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-02-11 08:09:28 -08:00
757301523b minor ifquery print fixes
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-02-11 06:00:07 -08:00
6ef5bfa291 Some compat fixes + some stp precommit test fixes
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-02-10 14:39:18 -08:00
d08d5f5478 More fixes and cleanup
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-02-08 09:05:32 -08:00
37c0543d34 More fixes and changes
Ticket: CM-1438
Reviewed By:
Testing Done: unit tested with all kinds of interfaces

some high level changes
- moved ipv4/ipv6 address handling in a single module. dhcp
into a separate module.
- new link 'up' module
- igmp fixes
- many other fixes
2014-01-30 22:36:41 -08:00
7ac4828157 minor init.d fixes
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-01-30 19:54:05 -08:00
cca03c30c5 some ifquery fixes + make the default to not follow dependents (
added a --with-depends option)

Ticket: CM-1438
Reviewed By:
Testing Done:

still debating on the default behaviour for following dependents.
for now not following dependents might be better.
When all interfaces are selected, it always follows dependents
2014-01-30 19:53:49 -08:00
739f665baa A whole lot of fixes and some new code (needs some cleanup which will be
part of subsequent checkins)

Ticket: CM-1438
Reviewed By:
Testing Done: Tested ifup, ifdown and ifquery

Conflicts:
	packages/ifupdown2-addons/addons/ifenslave.py
2014-01-30 19:53:25 -08:00
f407f5cfe8 Update TODO lists
Ticket:
Reviewed By:
Testing Done:

Conflicts:
	packages/ifupdown2/TODO
2014-01-30 19:51:51 -08:00
9ffc685540 Update TODO lists
Ticket:
Reviewed By:
Testing Done:

Conflicts:
	packages/ifupdown2/TODO
2014-01-30 19:49:49 -08:00
97fbe42e15 Update TODO
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-01-30 19:47:09 -08:00
47cd15c473 Update examples file
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-01-30 19:46:52 -08:00
9792ab06ce Update TODO lists
Ticket:
Reviewed By:
Testing Done:
2014-01-30 19:46:35 -08:00
bc019e1404 minor init.d fixes
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-01-20 12:02:03 -08:00
29704612b0 some ifquery fixes + make the default to not follow dependents (
added a --with-depends option)

Ticket: CM-1438
Reviewed By:
Testing Done:

still debating on the default behaviour for following dependents.
for now not following dependents might be better.
When all interfaces are selected, it always follows dependents
2014-01-17 23:10:12 -08:00
389f3a711a A whole lot of fixes and some new code (needs some cleanup which will be
part of subsequent checkins)

Ticket: CM-1438
Reviewed By:
Testing Done: Tested ifup, ifdown and ifquery
2014-01-16 06:46:17 -08:00
a565fbcb2b Update TODO
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-01-15 15:23:38 -08:00
9bf80f711d Update examples file
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-01-15 14:42:56 -08:00
d5a1fa8544 Update TODO lists
Ticket:
Reviewed By:
Testing Done:
2014-01-15 14:42:04 -08:00
4bec729f5a Merge branch 'CumulusLinux-2.0_br'
Conflicts:
	build-config/conf/linux.vci.config
	build-config/conf/snapshot-manifest-powerpc
	build-config/make/images.make
	build-config/make/kernel.make
	packages/cl-utilities/dist-packages/cumulus/platformdb.py
	packages/cl-utilities/dist-packages/cumulus/platforms/accton.py
	packages/ifupdown2/pkg/ifupdownmain.py
	packages/mstpd/debian/mstpd.postinst
	packages/mstpd/debian/mstpd.postrm
	packages/mstpd/debian/mstpd.preinst
	packages/mstpd/debian/mstpd.prerm
	patches/bridge-utils/igmp_snoop_support.patch
	patches/bridge-utils/series
	patches/kernel/network-bridge-igmp-ifupdown-fixes.patch
	patches/kernel/platform-cel-p2020.patch
	patches/kernel/platform-powerpc-85xx-Makefile.patch
	patches/kernel/platform-quanta-ly6.patch
	patches/kernel/series
	patches/mstpd/igmp_snooop_ifupdown.patch
	patches/mstpd/series
	tests/portconfig/test_vectors/cel,redstone@None/default/portsbcm
	utilities/packages/autolib/netobjects.py
2014-01-10 13:31:25 -08:00
579b3f255d some fixes + template support
Ticket: CM-1438
Reviewed By:
Testing Done:

This patch adds support for mako style templates.

Example:
% for v in [20,30,40]:
auto vlan${v}
    iface vlan${v} inet static
    address 10.20.${v}.3/24
    mstpctl_ports  glob swp1-52.${v}
    mstpctl_stp on
% endfor

open items:
    - currently templates will only work if python-mako is installed
      (Its apt-gettable from debian wheezy).
2013-12-20 13:59:37 -08:00
551a3627d4 Some fixes in dependency handling
Ticket: CM-1438
Reviewed By:
Testing Done: tested with configs involving vlan devices and bridges

- fix dependency handling which i had broken recently with my last
  checkin (nat reported this one)
- In inet pluggins, dont issue ip addr get unless required (saw cpu
  spike up because of CM-1889)
- and some other minor changes lying in my tree
2013-11-30 23:52:30 -08:00
66e49e4c3e Merge remote-tracking branch 'origin/CumulusLinux-2.0_br'
Conflicts:
	packages/ifupdown2-addons/addons/bridge.py
	packages/ifupdown2-addons/addons/cmdhooks.py
	packages/ifupdown2-addons/addons/hooks.py
	packages/ifupdown2-addons/addons/ifenslave.py
	packages/ifupdown2-addons/addons/inet.py
	packages/ifupdown2-addons/addons/inet6.py
	packages/ifupdown2-addons/addons/usercmds.py
	packages/ifupdown2/KNOWN_ISSUES
	packages/ifupdown2/sbin/ifupdown
	packages/ifupdown2/setup.py
	patches/quagga/vtysh-fix-ipv6-afi-node.patch
2013-11-20 16:41:40 -08:00
10720a537d cleanup ifquery for interfaces that were configured but got deleted or
went away

Ticket: CM-1438
Reviewed By:
Testing Done:
2013-11-13 23:00:02 -08:00