8e36a2ac61
When libvirt daemon is restarted, qubesd attempt to re-connect to the new instance transparently (through virConnect object wrapper). But the code lacked re-registering event handlers. Fix this by adding reconnect callback argument to virConnectWrappper, to be called after new connection is established. This callback will additionally get old connection as an argument, if any cleanup is needed. The old connection is closed just after callback returns. Use this to re-register event handler, but also unregister old handler first. While full unregister wont work on since old libvirt daemon instance is dead already, it will still cleanup client structures. Since the old libvirt connection is closed now, adjust also domain reconnection logic, to handle stale connection object. In that case isAlive() call throws an exception. Fixes QubesOS/qubes-issues#5303 |
||
---|---|---|
.. | ||
api | ||
ext | ||
qmemman | ||
storage | ||
tests | ||
tools | ||
vm | ||
__init__.py | ||
app.py | ||
backup.py | ||
config.py | ||
devices.py | ||
dochelpers.py | ||
events.py | ||
exc.py | ||
features.py | ||
firewall.py | ||
log.py | ||
rngdoc.py | ||
tarwriter.py | ||
utils.py |