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

24 Commits

Author SHA1 Message Date
Maximilian Wilhelm
97e09957b4 Add addon module for B.A.T.M.A.N. advanced interface configuration. (#12)
* Add addon module for B.A.T.M.A.N. advanced interface configuration.

  This commit adds support for configuring B.A.T.M.A.N. advanced interfaces
  with ifupdown2. B.A.T.M.A.N. advanced is a protocol to build Layer2 based
  mesh networks with. It's supported in the Linux kernel and thus available
  in many Linux environments.

  A configuration could look like this

  auto bat0
  iface bat0
      batman-ifaces eth1 eth2.23
      batman-ifaces-ignore-regex .*_nodes
      batman-hop-penalty 23
      #
      address 192.0.2.42/24

  where »bat0« would be the local connection to the mesh network.

  The interfaces »eth1« and »eth2.23« would be used by the B.A.T.M.A.N. adv.
  protocol to communicate to other member of the mesh network.

  Any interfaces matching the »ifaces-ignore-regex« will be gently ignored
  by ifquery and ifreload as there might be some tunnels or interfaces
  added to the mesh network by other means which should not be removed by
  any subsequent ifreload run.

  The »hop-penalty» parameter set the penalty of this node within the mesh
  network.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>

* addons: batman_adv: replacing rtnetlink by netlink api call and iproute2 instantiation fix

These changes are due to modifications we introduced in debian-prep2.
We no longer use the rtnetlink_api but a new one "netlink" build on top of python-nlmanager.

* Reflect upstream change where flags are stored.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2018-03-13 14:41:46 +11:00
Julien Fortin
0e26f548f6 debian: adding divertion for existing bash completion file
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-11-01 19:40:00 +01:00
Julien Fortin
198ded6a35 Import python-nlmanager mirror copy
Ticket: CM-7360
Reviewed By: CCR-4721
Testing Done: smoke / testifreload / Tested on amd64 platform (by Sam)

For now, we use a mirror copy of nlmanager sources to make sure we don't
depend on it as an external package

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2016-06-16 03:37:35 +01:00
Roopa Prabhu
8465de9077 addons: support for new addon module for vrf
This patch adds initial support for vrf in ifupdown2.

Example interfaces file section:
auto swp1.100
iface swp1.100
    vrf blue

auto blue
iface blue
    vrf-table 10

iproute2 vrf map is generated under:
/etc/iproute2/rt_tables.d/ifupdown2.vrf_map

this patch also adds prelimnary support for 'vrf-table auto'.
But this needs more work.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-01-28 22:01:59 -08:00
Roopa Prabhu
59dad2ca80 debian: sync debian files with from upstream debian repo
These include changes that were done to move ifupdown2
to use pybuild and some debian policy fixes

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2015-12-20 23:06:12 -08:00
Roopa Prabhu
2ec2da0cf9 new ifupdown2 link module to create dummy devices
Ticket: CM-3525
Reviewed By: CCR-3326
Testing Done: Tested creating dummy devices using ifupdown2

This is modification to gospos loopback module. It solves the same
purpose ie using linux dummy device like a loopback device but there were
objections on calling it loopback so i have renamed it to link and i have changed it
into a generic module that can do any 'ip link'. Can be extended for
link args in the future.

below example creates a loopy device

$ifquery loopy
auto loopy
iface loopy
link-type dummy

$ifup loopy
$ifquery -c loopy
auto loopy
iface loopy [pass]
link-type dummy [pass]

(cherry picked from commit 1151420408a53c106d29183a1e0da5562c8b03a3)
2015-08-29 07:02:50 -07:00
Sam Tannous
6cb589dfdf Allow customer set bond defaults for CL with ifupdown2
Ticket: CM-6723
Reviewed By: roopa
Testing Done: unit tested and testifupdown2 test suite

This patch installs bond interface defaults in

     /etc/network/ifupdown2/policy.d/bond_defaults.json

and allows users to modify this file.   Users can then leave out these
bond attributes in their configs to save typing and space.

It also changes the ifenslave and ifenslaveutil module to bond and
bondutil, respectively to be consistent with other modules
(and also because customers think of "bond" interfaces not
"ifenslave" interfaces.)

For example, the default file installed looks like the following:

{
    "README": "This file is user generated and modifiable.",
    "bond": {
        "defaults": {
                "bond-mode": "802.3ad",
                "bond-miimon": "100",
                "bond-use-carrier": "1",
                "bond-lacp-rate": "0",
                "bond-min-links": "1",
                "bond-xmic-hash-policy": "layer3+4"
         }
    }
}
Please enter the commit message for your changes. Lines starting
2015-07-22 18:38:07 -04:00
Sam Tannous
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
Roopa Prabhu
49e5c096bd Add dependency on python-argcomplete, python-ipaddr and python-gvgen
Ticket: CM-4453
Reviewed By:
Testing Done: Build tested
(cherry picked from commit ee9aa1a1bf510f950030f72cbc12ed41b0bc880d)
2015-02-09 17:27:35 -08:00
Roopa Prabhu
e8278339d3 Fix setup.py to include new example file names
Ticket: CM-3346
Reviewed By:
Testing Done:checked build
(cherry picked from commit ab6e46851087ae0302f1fb457eb6adb8900a13d9)
2014-11-26 13:07:34 -08:00
Roopa Prabhu
045ad9a394 re-add bridgevlan.py which was accidently removed by previous checkins
Ticket: CM-3346
Reviewed By:
Testing Done:
2014-11-19 14:09:45 -08:00
Roopa Prabhu
7e39bbdfcf Add vlan aware bridge examples
Ticket: CM-3346
Reviewed By: pending review
Testing Done: example files are tested
2014-11-15 23:22:01 -08:00
Roopa Prabhu
261379f01b Add /etc/default/networking to provide an easier way to change
ifupdown logging from /etc/init.d/networking.

Ticket: CM-3891
Reviewed By:
Testing Done: Tested changing default networking parameters

- This provides a way to log to syslog
- if syslog is not enabled, msgs are output to stdout (in case of boot
  these should be captured by bootlog in > 2.5)

Note that these values only affect logging from the
/etc/init.d/networking script and has nothing to do with ifupdown2
logging when ifupdown2 is used outside of /etc/init.d/networking
2014-11-07 15:18:42 -08:00
Roopa Prabhu
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
Roopa Prabhu
904908bc5f Documentation cleanup
Ticket:
Reviewed By:
Testing Done:

- these changes are mainly related to api doc generation using sphinx
2014-07-22 11:15:56 -07:00
Roopa Prabhu
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
roopa
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
roopa
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
roopa
ee20f46e8d Fix build error
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-04-18 21:05:03 -07:00
roopa
14dc390d71 Fixes to some corner cases + support for some missing 'options and
attributes' for backward compatibility

Ticket: CM-1438
Reviewed By:
Testing Done: Tested ifupdown sanity and new functionality

support for:
- -i <interface file>
- template lookup path and move all template handling to a separate
  module template.py
- new ifupdown2 config file /etc/network/ifupdown2/ifupdown2.conf
- bridge_waitport and bridge_maxwait
- moved addons.conf to /var/lib/ifupdownaddons/
2014-04-18 14:09:20 -07:00
roopa
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
roopa
3e8ee54f30 more fixes + cleanup + support for --exclude argument
Ticket: CM-1438
Reviewed By:
Testing Done:
2013-11-13 16:07:15 -08:00
roopa
eab25b7c62 Some fixes + enhancements
Ticket: CM-1438
Reviewed By:
Testing Done: Tested installing new ifupdown on the box

- fixed a few things in ifquery
- added new perfmode to skip some of the checks (useful during boot when there is
  no previous state)
- updated doc dir with example
- Added README, TODO and KNOWN_ISSUES file
2013-11-11 10:56:36 -08:00
roopa
a6f80f0e0b python-ifupdown initial checkin
Ticket: CM-1438
Reviewed By: TBD
Testing Done:

- Will checkin build files after some more testing and performance
  numbers. It will go into the testing repo for 2.0

- All TODO items are part of the checked in TODO file
2013-11-04 06:06:11 -08:00