« Previous | Next » 

Revision 11714164

ID117141642d544bdc914c127811cc6954c9df9852

Added by Dimitris Aragiorgis about 11 years ago

Hotplug: cmdlib support

Hotpluging is done by functions invoked by ApplyContainerMods(). In
order hotpluging to take place a --hotplug option must be passed.

If no --hotplug is passed during gnt-instance modify the modifycations
will take place after reboot.

A device is hotplug-able if it has a uuid after which it gets named from
the hypervisor perspective.

Before hotpluging a Disk it must be assembled. During
LuInstanceSetParams() newly created disks are not added to the instance
so _ExpandCheckDisks() in _AssembleInstanceDisks() will fail. So we make
this check optional only for this case.

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

Everything else is just like NIC hotplugging.

Add logging in case of hotplug.

Signed-off-by: Dimitris Aragiorgis <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences