« Previous | Next » 

Revision e8e50805

IDe8e50805f8302228db94a742bc9af6c5b5ee4427

Added by Dimitris Aragiorgis about 7 years ago

(2.10) Hotplug: cmdlib support

Hotplugging is done by functions invoked by ApplyContainerMods(). In
order hotplugging to take place the --hotplug option must be passed
otherwise the modifications will take place after reboot.

NIC hotplug supports add, remove and modify. The modify is done by removing
the existing NIC and adding a new one in the same pci slot.

Disk hotplug supports add and remove. Before hotplugging a Disk it
must be assembled. Use blockdev_assemble RPC, get the device link_name
and then call hotplug RPC command.

In order to remove a disk (with blockdev_remove) it must be shutdown. So
after unplugging the disk ShutdownDiskInstanceDisks() must be invoked.

For both device types we use the generic RPC call_hotplug_device.

Also adapt unit tests to follow the change.

Signed-off-by: Dimitris Aragiorgis <>
Signed-off-by: Thomas Thrainer <>
Reviewed-by: Thomas Thrainer <>

cmdlib unittests do not exist in stable-2.8
The other were easy to resolve

Conflicts:
lib/cmdlib/instance.py
lib/cmdlib/instance_storage.py
test/py/cmdlib/backup_unittest.py

Signed-off-by: Dimitris Aragiorgis <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences