From 0e7f7f8566f3e7fcf5bce395555fa1b5cf1e136b Mon Sep 17 00:00:00 2001 From: Osier Yang Date: Tue, 3 May 2011 14:48:03 +0800 Subject: [PATCH] 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. --- src/lxc/lxc_driver.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- GitLab