When trying to create a new session and the agent hits the max display number allowed ('/vsmagent/display_max'), nothing is reported to the server and the client hangs while waiting. The server waits the entire timeout before trying another agent (usually 40 seconds).
- Configure '/vsmagent/display_max' to be 1 more than '/vsmagent/display_min'
- Try to start two sessions on that agent
Fixed now. Tested on RHEL8:
- First session on an agent gets 'display_min' as display number.
- Creating a new session -> the lowest free display is used.
- With many sessions the last session on an agent gets 'display_max'.
- Trying to create a session on a full agent -> server tries
another agent or reports no available agents to client directly.
No need to wait for timeout.
Tested on RHEL 8 by configuring display_min=10 and display_max=14 and logging in 6 users.
On 4.12.1 the first _FOUR_ work fine, but the fifth hangs for a while and then reports "No agent server was available".
Nothing was logged in vsmagent.log, and this was in vsmserver.log:
> 2021-03-19 13:40:32 INFO vsmserver.session: User with uid 1005 (user5) requested a new session
> 2021-03-19 13:41:12 WARNING vsmserver: Timeout trying to start new session for user5 on VSM Agent 127.0.0.1:904
With a current build the first _FIVE_ work fine and the fifth is instantly rejected. I now get this in vsmagent.log:
> 2021-03-19 13:52:58 WARNING vsmagent.session: Unable to find free display number when starting session for user6. Reporting to VSM Server
And this in vsmserver.log:
> 2021-03-19 13:52:58 INFO vsmserver.session: User with uid 1006 (user6) requested a new session
> 2021-03-19 13:52:58 WARNING vsmserver: VSM Agent 127.0.0.1 reported failure creating session for user6
Looks good. :)