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

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

 



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

--
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]