Statistics
| Branch: | Tag: | Revision:

root / lib / hypervisor @ ed6d006b

Name Size
__init__.py 2 kB
hv_base.py 18.8 kB
hv_chroot.py 10.3 kB
hv_fake.py 10.3 kB
hv_kvm.py 100.8 kB
hv_lxc.py 15.3 kB
hv_xen.py 37.1 kB

Latest revisions

# Date Author Comment
ed6d006b 02/04/2014 03:47 pm Dimitris Aragiorgis

ifdown: Use new methods to unconfigure NICs

We unconfigure a NIC (invoke ifdown script) during:

  • instance cleanup
  • finalizing successful migration on source node
  • hot-unplugging a NIC

In case of migration we do only a local cleanup.

Signed-off-by: Dimitris Aragiorgis <>

31a2b501 02/04/2014 03:47 pm Dimitris Aragiorgis

ifdown: Use new methods to create NIC files

NIC files containing corresponding tap name are created during:

  • instance startup
  • NIC hot-add

For compatibility we continue creating indexed based NIC files along
with uuid based ones.

Signed-off-by: Dimitris Aragiorgis <>

a97bcacf 02/04/2014 03:33 pm Dimitris Aragiorgis

ifdown: Introduce _UnconfigureNIC() helper method

This method takes a NIC object, creates the proper invironment
and invokes ifdown script.

It takes an extra boolean argument only_local which is passed
to ifdown script as the second positional argument. It states...

12eaf843 02/04/2014 03:04 pm Dimitris Aragiorgis

ifdown: Make Read/LoadKVMRuntime classmethods

.. and make LoadKVMRuntime() take instance_name rather than the
whole instance object as first argument. This will be needed during
instance cleanup where we the instance object is not available.

We are going to retrieve current NIC configuration from the runtime...

cc3a2cd9 02/04/2014 02:56 pm Dimitris Aragiorgis

ifdown: Extract env creation from ConfigureNic()

Introduce new helper method that creates the environment passed
to ifup/ifdown scripts. Instance tags and NIC index will be passed
only during ifup script since only then are available and
valid. Both can change until a NIC gets removed and thus will not...

9dcc20b4 02/04/2014 02:25 pm Dimitris Aragiorgis

ifdown: Introduce helper methods

Until now Ganeti upon TAP creation, a NIC file was created
under $RUNDIR/kvm-hypervisor/nic/<instance_name>/<nic_index>

Since NICs have obtained a UUID, we are going to create another
file named after its UUID. This will be needed during ifdown...

0585ede0 02/03/2014 11:50 pm Dimitris Aragiorgis

Change kvm-if* scripts

  • Rename kvm-vif-bridge to kvm-ifup-custom
  • Search if /etc/ganeti/kvm-if*-custom is available
    and execute it instead
  • Pass positional argument to custom script

Signed-off-by: Dimitris Aragiorgis <>

5063d1d5 02/03/2014 11:50 pm Dimitris Aragiorgis

(kvm) Hotplug a device found only in config.data

A device can be added only in config.data by omitting `--hotplug`
option. With this patch we allow this device to be hot-plugged
in the future by issuing `gnt-instance modify --net <index>: --hotplug`
command. HotModDevice() will search the runtime entry of the device...

86b60f21 02/03/2014 11:49 pm Dimitris Aragiorgis

(2.10) Workaround for monitor bug related to greeting msg

QMP may return multiple greeting messages upon connection.
This is reported on qemu-devel. The fix is one-liner but
until it get's released this is a quick and dirty workaround
that flushes the client's buffer after getting the first...

065d194b 02/03/2014 11:49 pm Dimitris Aragiorgis

(2.10) hotplug: Verify if a command succeeded or not

Just after issuing _CallHoplugCommands() we invoke
_VerifyHotplugCommand() which parses `info pci` result
and searches for given PCI slot and device id.

If we previously had removed a device but it is still there...

View revisions

Also available in: Atom