mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 12:16:49 +00:00
fix(console): the console daemons log where the operator looks
- novncd and socketiod log to stderr: the journal on hosts, docker logs in the container (runit no longer sends them to unrotated files under /var/log). Django's settings gave them the panel's own log file, which every process rotated on its own, and made novncd's -v and -d have no effect; both work again. - A refused console says why in the log: novncd's denials are warnings (they were shown only with -v), socketiod logs each refusal and who opened which VM's serial console. - The README's serial console notes say what #228 changed (access re-checked, superuser takeover, reasons) and where the logs are.
This commit is contained in:
parent
c169ccf5fe
commit
3bd9fe63e5
7 changed files with 51 additions and 38 deletions
|
|
@ -577,12 +577,13 @@ class NovncdDaemonLogicTestCase(TestCase):
|
|||
handler.msg = MagicMock()
|
||||
|
||||
socket_factory = MagicMock()
|
||||
# Should cleanly exit and log message without raising UnboundLocalError
|
||||
handler._new_client(socket_factory=socket_factory)
|
||||
# a refusal is a warning: it shows in the log without -v
|
||||
with self.assertLogs(level="WARNING") as log:
|
||||
handler._new_client(socket_factory=socket_factory)
|
||||
|
||||
mock_get_info.assert_not_called()
|
||||
socket_factory.assert_not_called()
|
||||
handler.msg.assert_called_with("No console token in the websocket URL")
|
||||
self.assertIn("without a token", log.output[0])
|
||||
|
||||
@patch("console.tokens.authorize")
|
||||
@patch("vrtManager.instance.wvmInstance")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue