[RFC 0/9] bonding support



This is a first RFC post implementing bonding support in NM. It's not yet
complete but functional on my system.

Requires libnl-3.2.1

Details
  o both master and slaves require a ifcfg file:
     o master:
         TYPE=bond
	 DEVICE=bond3
	 BONDING_OPTS="mode=..."
     o slaves:
         TYPE=Ethernet
         MASTER=bond3

  o both master and slaves will have their own connection, creation
    of a new master connection of type "bond" trigger creation of
    virtual in-kernel interface if it does not exist yet.

  o activation of slaves is postponed until a connection is present
    with matching DEVICE= config

  o slave connection get no ip4/ip6 config but get a special "disabled"
    ip4 config added in order not to trigger dhcp on the slaves.

  o upon activation of slave, slave is enslaved to master using libnl3
    or if kernel does not support it yet, using ioctl()

  o There is no NMDeviceBond, NMDeviceEthernet is reused since a bond
    is basically an ethernet device. Good idea?

  o "master" property of all slaves return "bond0", "bond3", ...

  o TODO: The bond connection does not wait with ip config until all
          slaves have activated yet. Not sure how to implement this
	  properly yet.

  o TODO: "slaves" property still missing

  o TODO: Proper GUI integration

  o TODO: Naming of slave connections to display their relationship to
          a slave.

Thoughts?

Thomas Graf (9):
  bonding: settings parser for ifcfg plugin + NMSettingBond class
  bonding: bonding master device creation
  bonding: Detect virtual bonding devices and create an ethernet device
  ethernet: Correctly match bonding ethernet devices with bonding
    connection
  connection-setting: implement ability to define a master connection
  device: Postpone auto-activation of a  slave until its master is
    present
  device: Add "master" property to provide a reference to the master
    link
  ifcfg: Ignore higher level configs for bonding slaves
  device: Enslave/release a link before bringing it up/down if belongs
    to a master

 libnm-util/Makefile.am                 |    2 +
 libnm-util/libnm-util.ver              |   13 +
 libnm-util/nm-connection.c             |    8 +-
 libnm-util/nm-setting-bond.c           |  554 ++++++++++++++++++++++++++++++++
 libnm-util/nm-setting-bond.h           |   94 ++++++
 libnm-util/nm-setting-connection.c     |   80 +++++
 libnm-util/nm-setting-connection.h     |   19 +-
 src/nm-device-ethernet.c               |   19 +-
 src/nm-device-interface.c              |    8 +
 src/nm-device-interface.h              |    2 +
 src/nm-device.c                        |   69 ++++
 src/nm-device.h                        |    5 +
 src/nm-manager.c                       |  119 +++++++-
 src/nm-manager.h                       |    4 +
 src/nm-policy.c                        |   50 +++
 src/nm-system.c                        |  268 +++++++++++++++-
 src/nm-system.h                        |    8 +
 src/nm-udev-manager.c                  |   13 +-
 src/settings/nm-settings.c             |   13 +-
 src/settings/plugins/ifcfg-rh/common.h |    3 +-
 src/settings/plugins/ifcfg-rh/reader.c |  216 ++++++++++++-
 21 files changed, 1531 insertions(+), 36 deletions(-)
 create mode 100644 libnm-util/nm-setting-bond.c
 create mode 100644 libnm-util/nm-setting-bond.h

-- 
1.7.6



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]