Hello,
This patch series adds support for the MacVTap device driver in Ganeti.
As stated in the respective design doc, this implementation targets the
KVM hypervisor. It also includes some new unit tests to cover the new
NIC mode introduced and also it documents the new feature in the
relevant man pages.
Thanks,
Dimitris
Dimitris Bliablias (28):
Update MacVTap ddoc to respect the latest changes
Introduce the 'macvtap' NIC mode
Introduce the 'macvtap_mode' nicparam
Create two new helpers in 'lib/query.py' module
Include 'macvtap_mode' nicparam to queries' output
Fix wrong description in getNic{Vlan,Link} methods
Introduce the 'ComputeMacvtapModeNicParam' method
Expose macvtap_mode nicparam to LUNetworkConnect lu
Add MacVTap checks in LUInstance{Create,SetParams}
Rename 'bridges_exist' RPC call to 'netdevs_exist'
Validate 'macvtap_mode' nicparam at cluster init
Include macvtap in NIC configuration scripts
Introduce an ifdown script for the KVM hypervisor
Make _{Read,Load}KVMRuntime class methods
Introduce the '_UnconfigureNIC' helper method
Introduce the '_HandleInstanceNICs' method
Prepare KVMHypervisor for the ifdown script
Apply new NIC configuration methods everywhere
Create a constant for inst communication tap prefix
Generate TAP names for the macvtap interfaces
Introduce the OpenMacVTap method for KVMhypervisor
Create the '_OpenTapHelper' KVM helper function
Enable the macvtap NIC functionality
Introduce the 'ListInstancesMacvtapNICs' method
watcher: Add a method to cleanup MacVTap devices
Add an extra arg to 'HotModDevice' function
Add unit tests for the MacVTap NIC mode
Document the MacVTap feature in man pages
.gitignore | 1 +
Makefile.am | 7 ++
doc/design-macvtap.rst | 56 +++++-----
lib/backend.py | 34 +++---
lib/bootstrap.py | 10 +-
lib/client/gnt_instance.py | 3 +-
lib/client/gnt_network.py | 13 ++-
lib/cmdlib/instance.py | 6 +-
lib/cmdlib/instance_create.py | 16 ++-
lib/cmdlib/instance_migration.py | 6 +-
lib/cmdlib/instance_operation.py | 10 +-
lib/cmdlib/instance_set_params.py | 38 ++++---
lib/cmdlib/instance_utils.py | 61 ++++++++---
lib/cmdlib/network.py | 13 +++
lib/config/__init__.py | 2 +
lib/hypervisor/hv_base.py | 51 ++++++---
lib/hypervisor/hv_chroot.py | 4 +-
lib/hypervisor/hv_kvm/__init__.py | 212 +++++++++++++++++++++++++++---------
lib/hypervisor/hv_kvm/netdev.py | 99 +++++++++++++++--
lib/hypervisor/hv_lxc.py | 16 +--
lib/hypervisor/hv_xen.py | 3 +-
lib/objects.py | 2 +-
lib/pathutils.py | 1 +
lib/query.py | 47 ++++++++
lib/rapi/client.py | 3 +-
lib/rpc_defs.py | 10 +-
lib/server/noded.py | 22 ++--
lib/utils/__init__.py | 19 +++-
lib/watcher/__init__.py | 41 +++++++
man/ganeti-watcher.rst | 4 +
man/gnt-cluster.rst | 11 +-
man/gnt-instance.rst | 19 ++--
src/Ganeti/Constants.hs | 42 ++++++-
src/Ganeti/HTools/Backend/IAlloc.hs | 1 +
src/Ganeti/HTools/Nic.hs | 2 +-
src/Ganeti/Objects/Nic.hs | 1 +
src/Ganeti/OpCodes.hs | 1 +
src/Ganeti/OpParams.hs | 7 ++
src/Ganeti/Query/Instance.hs | 14 +++
src/Ganeti/Query/Network.hs | 20 +++-
src/Ganeti/Types.hs | 1 +
test/hs/Test/Ganeti/OpCodes.hs | 5 +-
test/py/cmdlib/instance_unittest.py | 68 +++++++++++-
tools/kvm-ifdown.in | 45 ++++++++
tools/kvm-ifup.in | 1 +
tools/net-common.in | 14 +++
46 files changed, 844 insertions(+), 218 deletions(-)
create mode 100755 tools/kvm-ifdown.in
--
2.1.4