Commit 0a8a0a5f authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Klaus Aehlig

Allow disk hot-remove even with chroot or SM

Up until now, in case the KVM hypervisor used chroot or pool/user
security model, disk hot-remove was not allowed. This should not be
the case since only during hot-add there are permission constrains.

Fix that.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent fb0e0879
......@@ -2093,12 +2093,13 @@ class KVMHypervisor(hv_base.BaseHypervisor):
hvp = instance.hvparams
security_model = hvp[constants.HV_SECURITY_MODEL]
use_chroot = hvp[constants.HV_KVM_USE_CHROOT]
if use_chroot:
raise errors.HotplugError("Disk hotplug is not supported"
" in case of chroot.")
if security_model != constants.HT_SM_NONE:
raise errors.HotplugError("Disk Hotplug is not supported in case"
" security models are used.")
if action == constants.HOTPLUG_ACTION_ADD:
if use_chroot:
raise errors.HotplugError("Disk hotplug is not supported"
" in case of chroot.")
if security_model != constants.HT_SM_NONE:
raise errors.HotplugError("Disk Hotplug is not supported in case"
" security models are used.")
if (dev_type == constants.HOTPLUG_TARGET_NIC and
action == constants.HOTPLUG_ACTION_ADD and not fdsend):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment