[libvirt] [PATCH] lxc: Do not try to reconnect inactive domain when do lxcStartup

Osier Yang jyang at redhat.com
Fri Apr 29 07:21:03 UTC 2011


Otherwise if there are inactive lxc domains, lxcStartup will
try to reconnect to sockets of these domains, which results in
errors in libvirtd log.
---
 src/lxc/lxc_driver.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index e905302..ef7827b 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;
--
1.7.4




More information about the libvir-list mailing list