core-admin/qubes
Marek Marczykowski-Górecki 8e36a2ac61
app: re-register event handler after libvirt daemon restart
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
2019-09-26 01:57:59 +02:00
..
api Merge remote-tracking branch 'origin/pr/277' 2019-08-08 14:05:00 +02:00
ext factor out utils.coro_maybe() 2019-06-28 10:29:24 +00:00
qmemman qmemman: fix early crash 2018-01-18 17:36:37 +01:00
storage Update lvm.py 2019-07-31 19:40:33 -04:00
tests tests: fix qrexec abort test 2019-09-22 23:30:38 +02:00
tools app: setup_pools() must be a coroutine 2019-06-28 10:29:26 +00:00
vm Fix too long line 2019-07-31 15:36:03 +02:00
__init__.py Fixed unexpected error on empty default template and incorrect error handling 2019-09-19 20:20:36 +02:00
app.py app: re-register event handler after libvirt daemon restart 2019-09-26 01:57:59 +02:00
backup.py Remove unused core2migration.py 2018-12-04 16:12:33 +01:00
config.py vm/adminvm: add run_service* functions 2019-06-09 21:00:02 +02:00
devices.py Drop unnecessary 'pass' to make pylint happy 2018-12-04 16:06:33 +01:00
dochelpers.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00
events.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00
exc.py Prevent removal of in-use storage pool 2019-02-27 06:03:57 +01:00
features.py qubes/features: check_with_(template_and_)adminvm 2018-12-20 18:28:33 +01:00
firewall.py Make pylint happy 2019-02-27 18:40:18 +01:00
log.py Change license to LGPL v2.1+ 2017-10-12 00:11:50 +02:00
rngdoc.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00
tarwriter.py Change license to LGPL v2.1+ 2017-10-12 00:11:50 +02:00
utils.py Fix invalid timezone 2019-08-06 18:23:00 -03:00