Commit Graph

9 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
0a06ad9152
events: ignore events from non-existing domains
It may happen that when client handle the event, domain no longer
exists. This is for example common for DispVMs, which get removed just
after shutdown.
This will cause some events to be dropped, but one can enable blind
mode, to get them anyway (because it will not cause KeyError, even if
domain is already removed).

QubesOS/qubes-issues#3100
2017-09-20 20:19:38 +02:00
Marek Marczykowski-Górecki
9c5531c5ad
events: add variable Admin API method name
Add support for differnet methods, not only admin.Events. For example
admin.vm.Stats also return events.
2017-07-28 22:28:27 +02:00
Marek Marczykowski-Górecki
b35303ff62
events: fix cleanup function in qrexec case
qrexec-client-vm process may be already dead, don't treat this as an
error.
2017-07-08 00:08:20 +02:00
Marek Marczykowski-Górecki
ce7d4865b6
events: fix calling mgmt.Events from VM
asyncio.create_subprocess_exec expects program and arguments directly,
not as a list.
2017-06-25 14:01:14 +02:00
Marek Marczykowski-Górecki
ba2057a2c6
events: improve handling qubesd restart
qubesd may be restarted during different stages of connection - either
while attempting to connect, or while already listening on events.
Adjust exception list accordingly.

This is especially important for qvm-start-gui - otherwise it crashes on
qubesd restart.
2017-06-21 05:03:04 +02:00
Marek Marczykowski-Górecki
065eb036df
events: fix parsing events with empty parameters
Empty parameter value is encoded as b'parameter\0\0', so we can't simply
read the data until b'\0\0', because it isn't necessary event end.
Instead, read event parts separately, according to specification.
2017-05-30 01:31:13 +02:00
Marek Marczykowski-Górecki
88b559d985
Invalidate domains cache when received an event affecting it
When events handling is enabled, use it for cache invalidation too.
2017-05-13 14:55:26 +02:00
Marek Marczykowski-Górecki
cfc9ff2ce5
Rename Mgmt API to Admin API: methods names
QubesOS/qubes-issues#853
2017-05-12 19:36:03 +02:00
Marek Marczykowski-Górecki
4ceff0f8c0
Rename qubesmgmt to qubesadmin module
QubesOS/qubes-issues#853
2017-05-11 23:40:03 +02:00