提交 22dc3e94 编写于 作者: M Michal Privoznik

Revert "domain_conf: check device address before attach"

This reverts commit f1d65853.

Turns out, this caused a regression. There is this (perhaps less
known) semantic of virDomainAttachDevice() where if the device
the API is trying to attach is a CDROM/floppy that is already in
the domain the attach request is handled as 'change the media in
the drive'.

We have a better fix anyways.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: NJim Fehlig <jfehlig@suse.com>
上级 ddc72f99
...@@ -28814,15 +28814,6 @@ virDomainDefCompatibleDevice(virDomainDefPtr def, ...@@ -28814,15 +28814,6 @@ virDomainDefCompatibleDevice(virDomainDefPtr def,
if (oldDev) if (oldDev)
data.oldInfo = virDomainDeviceGetInfo(oldDev); data.oldInfo = virDomainDeviceGetInfo(oldDev);
if (action == VIR_DOMAIN_DEVICE_ACTION_ATTACH &&
data.newInfo &&
data.newInfo->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
virDomainDefHasDeviceAddress(def, data.newInfo)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Domain already contains a device with the same address"));
return -1;
}
if (action == VIR_DOMAIN_DEVICE_ACTION_UPDATE && if (action == VIR_DOMAIN_DEVICE_ACTION_UPDATE &&
live && live &&
(data.newInfo && data.oldInfo && (data.newInfo && data.oldInfo &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册