« Previous | Next » 

Revision 5d9bfd87

ID5d9bfd870aa8ac759eccaca8b45a70ae2c7bddc7

Added by Apollon Oikonomopoulos over 11 years ago

KVM: Perform network configuration in Ganeti

This patch introduces network configuration for KVM in Ganeti.

There are three problems with having KVM perform network configuration via ifup
scripts:
a) Ganeti never gets to know the tap interface that is associated with an
instance's NIC
b) Migration of routed instances will cause network problems because the
incoming KVM side configures the network as soon as it is spawned and not
as soon as the migration finishes. This means that all routing
configuration will be present in both, primary and secondary, nodes at the
same time, possibly causing network disruption during the migration.
c) We never get to know if the network configuration succeeded or not.

This patch moves network configuration from KVM to Ganeti, using KVM's ability
to receive already open tap devices as file descriptors.

_WriteNetScript is removed from hv_kvm.py, together with its unit tests.

Minor modifications are made to _ExecKVMRuntime to handle tap device
initialization. NIC <-> tap associations are stored under a new directory,
_ROOT_DIR/nic in a file-per-nic fashion.

The end-user semantics remain the same: The user can override the network
configuration by providing _KVM_NET_SCRIPT. If this is not present or
executable, the default constants.KVM_IFUP script is run.

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Guido Trotter <>
Reviewed-by: Guido Trotter <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences