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

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



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);
 

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