It needs to be converted to work with Python 3.
Here is a list of shared dependencies between VSM Server and VSM Agent (bug 7629): * vsm.xmlrpc * ctcommon * vsm.vsmcommon * vsm.extproc * vsm.async * which * vsm.authoritychecker * vsm.check_environment
Commit r36123 was accidentally sent without a finished commit message. Here is what is should have said: ------------------------------------------------------------------------ r36123 | frifl | trunk/ctc/vsm/ Move out VSM handlers from vsmcommon It is more clear to have the handlers in their own module. Done as part of bug 7629 and bug 7630. ------------------------------------------------------------------------
Clarification to r36213: Functionally tested by verifying that sessions are successfully removed when upon starting a session, killing the agent and waiting for the master to invoke the periodic session verification.
Crypto ------ The crypto module is now converted to support Python 3. I have tested that the following still works as expected: * tl-ldap-certalias (CentOS 7) * Loading and verifying licenses (RHEL 8) * sso (RHEL 8)
Licensehandler -------------- Licensehandler can now support Python 3. I have tested that the following still work with Python 2 on Ubuntu20.04: * Valid licenses * Invalid licenses (too old TL version) * Admin warning mail with non-ASCII characters in customer name. * Warning when hitting soft limit * Not allowing more sessions when hitting hard limit * License graph in tlwebadm * tl-show-licenses
Login handlers -------------- (handler_newsession, handler_shadowsession, handler_reconnectsession) The login handlers now support Python 3. I tested that the following still works with Python 2 on RHEL 8: * Creating new session * Reconnecting to session * Shadow session
LoadBalancer ------------ The loadbalancer now support Python 3. Some changes was made to implementation of the sorting of prioritized agents. Also, now the sorting of agents that a user has sessions on is more correct than before, the user should get new session on the best agent. This is a corner case since it requires multiple sessions and that the user has these session spread out on multiple agents. This should not happen in the normal case. I have tested that the following still works: - User gets new session on the agent with highest rating. - With multiple sessions user gets new sessions on the same agent independent of rating. - With multiple sessions user gets new session on another agent if the user's agent is down. But first the agent that is marked as down is tested to see if it is really down. - User with two sessions on two different agents, wanting to created a third the one of the user's agents with the highest rating is chosen. - User has session on agent that has been removed from the configuration. If the user wants new session it is created on another agent and there is a warning in the vsmserver log about this. - Tlwebadm page for load info works fine (Status -> Load).
UserSocket ---------- usersocketserverchannel, usersocketserver, and handler_createusersocket now supports python 3. After conversion, the following functionality has been tested: - Creation and removal of unix domain socket in `/var/run/thinlinc/master/' - Startup of a new session - Reconnecting to a pre-existing session - Shadowing
Getting resource warnings for the main socket: > sys:1: ResourceWarning: unclosed <socket.socket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 9000)> And for user sockets: > sys:1: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, laddr=/var/run/thinlinc/master/0>
The resource warning for the listening socket should now be fixed. Unfortunately I could not reproduce the warning for the user sockets, and I cannot see where in the code this might happen. Will have to wait for more information there.
I'm getting this depracation warning on Ubuntu 20.04: > $ sudo /opt/thinlinc/sbin/tl-show-licenses > /opt/thinlinc/modules/thinlinc/vsm/licensehandler.py:387: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. > I1iiIII1i . readfp ( iII11iI1i ) > License summary: 50 concurrent users. Hard limit of 55 concurrent users. > ThinLinc version: 4.12.1post
This was apparently already noted in the code and will be fixed once we drop Python 2 compatibility from that module.