]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: don't kill qemu process on restart if networkNotify fails
authorLaine Stump <laine@laine.org>
Tue, 25 Apr 2017 16:20:30 +0000 (12:20 -0400)
committerCole Robinson <crobinso@redhat.com>
Wed, 10 May 2017 22:02:39 +0000 (18:02 -0400)
commit29b57a2f15b8993935947e12692693a01efeaefb
treee352efbcaea02ffed7d49d1a035e6af6dccbd621
parent6287e7ea4a47e6035df91548bbc4983628898d23
qemu: don't kill qemu process on restart if networkNotify fails

Nothing that could happen during networkNotifyActualDevice() could
justify unceremoniously killing the qemu process, but that's what we
were doing.

In particular, new code added in commit 85bcc022 (first appearred in
libvirt-3.2.0) attempts to reattach tap devices to their assigned
bridge devices when libvirtd restarts (to make it easier to recover
from a restart of a libvirt network). But if the network has been
stopped and *not* restarted, the bridge device won't exist and
networkNotifyActualDevice() will fail.

This patch changes networkNotifyActualDevice() and
qemuProcessNotifyNets() to return void, so that qemuProcessReconnect()
will soldier on regardless of what happens (any errors will still be
logged though).

Partially resolves: https://bugzilla.redhat.com/1442700

(cherry picked from commit cb182eb11d3a99adb06e188989899dcd488c43fc)
src/network/bridge_driver.c
src/network/bridge_driver.h
src/qemu/qemu_process.c