mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
fix(logs): libvirt prints no errors on the processes' stderr
libvirt's default handler printed each error on stderr without saying where it came from: in Docker those lines went to docker logs, and a VM page read of a shut-off VM left one there. Every process that talks to libvirt imports vrtManager.connection, which now registers a silent handler; the errors still reach their callers as exceptions. The console callback's own registration is dropped.
This commit is contained in:
parent
5d90d3fcf9
commit
f670ee7333
3 changed files with 17 additions and 3 deletions
|
|
@ -28,9 +28,6 @@ from instances.utils import can_open_console # noqa: E402
|
|||
from operations.utils import public_error_text # noqa: E402
|
||||
from vrtManager.connection import connection_manager # noqa: E402
|
||||
|
||||
# libvirt prints its errors on stderr, which is the user's terminal: they are
|
||||
# raised and told in one line instead
|
||||
libvirt.registerErrorHandler(lambda context, error: None, None)
|
||||
SEND_WAIT = 5 # seconds a paste may wait for the VM to take it
|
||||
ACCESS_CHECK = 10 # seconds between checks that the user may still use the console
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue