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

[libvirt] [PATCH] qemu: don't goto cleanup when qemuDomainRemoveDevice failed at function qemuProcessUpdateDevices



Function qemuProcessUpdateDevices was called at qemuProcessReconnect
when we detach net device lively and killed libvirtd service at middle.
qemu detached the device but libvirtd don't save it at runDir. when
libvirtd restart, libvirtd will detach net device but qemu will return
fail because device was not found. then libvirtd qemuProcessReconnect
failed and goto error. libvirtd kill qemu. To avoid qemu is killed by
libvirtd, qemuDomainRemoveDevice will not return failed.
---
 src/qemu/qemu_process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 6d242b1..9f9393b 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3234,7 +3234,7 @@ qemuProcessUpdateDevices(virQEMUDriverPtr driver,
             if (!virStringListHasString(qemuDevices, *tmp) &&
                 virDomainDefFindDevice(vm->def, *tmp, &dev, false) == 0 &&
                 qemuDomainRemoveDevice(driver, vm, &dev) < 0) {
-                goto cleanup;
+                VIR_WARN("failed to remove device %s at reconnect process", *tmp);
             }
             tmp++;
         }
-- 
2.8.3



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