Bug 8449 - Configuring HA when agents contain stray sessions can cause vsmserver.log backtrace
Summary: Configuring HA when agents contain stray sessions can cause vsmserver.log bac...
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Server (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-14 16:58 CET by William Sjöblom
Modified: 2024-11-19 13:29 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description William Sjöblom cendio 2024-11-14 16:58:09 CET
I was configuring HA with a customer when we encountered the following backtrace on master #2 when master #1 tried to send the sessiondb diff:

> 2024-11-14 08:32:45 ERROR vsmserver: Traceback (most recent call last):
> 2024-11-14 08:32:45 ERROR vsmserver:   File "/usr/lib64/python3.9/asyncio/events.py", line 80, in _run
> 2024-11-14 08:32:45 ERROR vsmserver:     self._context.run(self._callback, *self._args)
> 2024-11-14 08:32:45 ERROR vsmserver:   File "/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py", line 349, in _callback_done
> 2024-11-14 08:32:45 ERROR vsmserver:     assert future is self . _response
> 2024-11-14 08:32:45 ERROR vsmserver: AssertionError
> 2024-11-14 08:32:45 ERROR vsmserver: ----------------------------------------
> 2024-11-14 08:32:46 ERROR vsmserver: Exception in callback SessionChangeHandler._verify_sessions_done(<Future>)
> 2024-11-14 08:32:46 ERROR vsmserver: handle: <Handle SessionChangeHandler._verify_sessions_done(<Future>)>
> 2024-11-14 08:32:46 ERROR vsmserver: ----------------------------------------
> 2024-11-14 08:32:46 ERROR vsmserver: Traceback (most recent call last):
> 2024-11-14 08:32:46 ERROR vsmserver:   File "/usr/lib64/python3.9/asyncio/events.py", line 80, in _run
> 2024-11-14 08:32:46 ERROR vsmserver:     self._context.run(self._callback, *self._args)
> 2024-11-14 08:32:46 ERROR vsmserver:   File "/opt/thinlinc/modules/thinlinc/vsm/handler_sessionchange.py", line 134, in _verify_sessions_done
> 2024-11-14 08:32:46 ERROR vsmserver:     if iIiIiiIIIiII [ 'error' ] or not iIiIiiIIIiII [ 'alive' ] :
> 2024-11-14 08:32:46 ERROR vsmserver: KeyError: 'error'

This happened after moving the master to a new machine, leaving stray sessons already running on the agents. Killing the all the stray tl-session and Xvnc processes on the agents and then restarting the vsmagent and vsmserver services resolved the issue.
Comment 1 William Sjöblom cendio 2024-11-14 17:00:17 CET
Not sure why this happens, but we should apparently not assume the `error` key to be part of that dict.

Note You need to log in before you can comment on or make changes to this bug.