From: Osier Yang Date: Tue, 3 May 2011 06:48:03 +0000 (+0800) Subject: lxc: Do not try to reconnect inactive domain when do lxcStartup X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0e7f7f8566f3e7fcf5bce395555fa1b5cf1e136b;p=libvirt.git lxc: Do not try to reconnect inactive domain when do lxcStartup Otherwise if there are inactive lxc domains, lxcStartup will try to reconnect to sockets of these domains, which results in errors in libvirtd log. --- diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index e90530284c..ef7827b492 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -1992,6 +1992,9 @@ lxcReconnectVM(void *payload, const void *name ATTRIBUTE_UNUSED, void *opaque) virDomainObjLock(vm); + if (!virDomainObjIsActive(vm)) + goto cleanup; + priv = vm->privateData; if ((priv->monitor = lxcMonitorClient(driver, vm)) < 0) { goto cleanup;