[PATCH 4/4] Revert "domain_conf: check device address before attach"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This reverts commit f1d6585300001c7b23b8796a0faa4411c3531996.

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: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index bce4e65e0d..14d3f4d67e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -28586,15 +28586,6 @@ virDomainDefCompatibleDevice(virDomainDefPtr def,
     if (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 &&
         live &&
         (data.newInfo && data.oldInfo &&
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux