From bd6d71a5556218808d65e96b4f8ffe7c61653878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 7 Jul 2020 19:45:29 +0200 Subject: [PATCH] vm: emit property-reset:stubdom_xid event on domain start/stop too Similart to property-reset:xid, emit property-reset:stubdom_xid when domain is started/stopped. This allows client side of the Admin API (qubes-core-admin-client) to invalidate the cache when necessary. Found by audio tests: #352 --- qubes/vm/qubesvm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 0177b9ba..590bfa9a 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -1147,6 +1147,8 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): # the above allocates xid, lets announce that self.fire_event('property-reset:xid', name='xid') + self.fire_event('property-reset:stubdom_xid', + name='stubdom_xid') self.fire_event('property-reset:start_time', name='start_time') except libvirt.libvirtError as exc: # missing IOMMU? @@ -1257,6 +1259,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): self.log.exception('Failed to stop storage for domain %s', self.name) self.fire_event('property-reset:xid', name='xid') + self.fire_event('property-reset:stubdom_xid', name='stubdom_xid') self.fire_event('property-reset:start_time', name='start_time') @asyncio.coroutine