nvazquez opened a new pull request, #13683:
URL: https://github.com/apache/cloudstack/pull/13683
### Description
This PR addresses 2 issues:
- In case of concurrent console proxy requests, 2 different threads could
modify the allowedSessions set and cause problems accessing the console
sessions (fix to be verified)
- After closing the browser tab for a VM console session, it was observed
that the connection remained open on the KVM host's VNC port.
- Before the fix: After opening multiple sessions for the same VM, each
new session opens a new socket connection on the KVM host on the VNC port but
was not closed after closing the console browser tab.
````
[root@ref-trl-12127-k-Mol9-nicolas-vazquez-kvm2 ~]# ss -tnp | grep 5901
ESTAB 0 55 10.0.33.112:5901 10.0.39.91:43024
users:(("qemu-kvm",pid=77212,fd=38))
ESTAB 0 55 10.0.33.112:5901 10.0.39.91:51796
users:(("qemu-kvm",pid=77212,fd=36))
ESTAB 0 0 10.0.33.112:5901 10.0.39.91:43008
users:(("qemu-kvm",pid=77212,fd=37))
ESTAB 0 0 10.0.33.112:5901 10.0.39.91:60794
users:(("qemu-kvm",pid=77212,fd=35))
````
- After the fix: Each time a console session is acquired, then only one
socket connection remains open per VM, and when it is closed then no
connections remain open:
````
[root@ref-trl-12127-k-Mol9-nicolas-vazquez-kvm2 ~]# ss -tnp | grep 5901
[root@ref-trl-12127-k-Mol9-nicolas-vazquez-kvm2 ~]# ss -tnp | grep 5901
ESTAB 0 0 10.0.33.112:5901 10.0.39.99:41826
users:(("qemu-kvm",pid=77212,fd=35))
[root@ref-trl-12127-k-Mol9-nicolas-vazquez-kvm2 ~]# ss -tnp | grep 5901
[root@ref-trl-12127-k-Mol9-nicolas-vazquez-kvm2 ~]# ss -tnp | grep 5901
ESTAB 0 0 10.0.33.112:5901 10.0.39.99:36836
users:(("qemu-kvm",pid=77212,fd=35))
````
Fixes: #13422
<!---
*******************************************************************************
-->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE
DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!---
*******************************************************************************
-->
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
- Replaced the `agent.zip` file on `/usr/share/cloudstack-common/vms/` for
each KVM host and recreated the CPVM
- Acquired multiple console sessions and verified the the established using
the `ss -tnp` command for VM's VNC ports
#### How did you try to break this feature and the system with this change?
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
document -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]