[libvirt] [PATCH] Don't clobber ID when redefining dom in xm driver

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

 



If redefining a domain in the xen xm driver, we unconditionally set the
domain ID to -1. This can make a running domain appear inactive, and
really confuse things. Just drop the offending code, since virGetDomain
already sets the ID to -1 if required.

Fix pointed out by Dan Berrange, more info can be found at
https://bugzilla.redhat.com/show_bug.cgi?id=508278

Thanks,
Cole
diff --git a/src/xm_internal.c b/src/xm_internal.c
index 9d021eb..2ca4506 100644
--- a/src/xm_internal.c
+++ b/src/xm_internal.c
@@ -2640,9 +2640,7 @@ virDomainPtr xenXMDomainDefineXML(virConnectPtr conn, const char *xml) {
         goto error;
     }
 
-    if ((ret = virGetDomain(conn, def->name, def->uuid)))
-        ret->id = -1;
-
+    ret = virGetDomain(conn, def->name, def->uuid);
     xenUnifiedUnlock(priv);
     return (ret);
 
--
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]