Bug 57099 - Veyon WebApiProxy connections last too long and may double the bandwidth usage
Summary: Veyon WebApiProxy connections last too long and may double the bandwidth usage
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: Veyon
Version: UCS@school 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: UCS@school 5.0 v6-errata
Assignee: Johannes Königer
QA Contact: Jürn Brodersen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-29 14:32 CET by Johannes Königer
Modified: 2024-09-26 13:12 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.091
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Königer univentionstaff 2024-02-29 14:32:12 CET
When a teacher uses the computer room and logs out or closes the module, the connection between the Veyon WebAPI proxy and the computers will stay alive for the UMC session time + 1 min. So by default 11 minutes.

What can happen:

1. teacher1 logs and starts the watch page
2. After the class, teacher1 logs out
3. next class directly after: teacher2 logs in and takes over computer room
4. Now for 11 minutes, the bandwidth usage from web api proxy to the computers is _doubled_ as old and new connections are up.

Of course, if teacher1 does not log out, it is not only for 11 minutes but as long as he keeps the computer room module session alive.

Basic reproduction steps:

1. Have a working computer room setup
2. Create two teachers
3. Login with the first teacher, watch the room
4. Track the bandwidth usage, e.g. with `iftop` or the number of connections e.g. `lsof -i -P`
5. As soon as you login with teacher2 and take over the room, you should see doubled bandwidth and doubled connections for as long as the module sessions are alive
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2024-03-01 11:44:23 CET
I think, an additional behaviour might multiply this problem:
some customers create a room that is called "All computers" that obviously contains all computers. If the computer room module is opened, it tries to detect the room automatically and chooses the first one that matches according to the clients IP address.
If a "All computers" room exists, this is usually the first room that matches, so a connection to all computers is established.
Comment 6 Johannes Königer univentionstaff 2024-09-26 08:26:40 CEST
Changes have been merged with commit c90b196c18cb1d00a8d3e9214327a91d8fca6274

Package: ucs-school-umc-computerroom
Version: 12.0.21

The VeyonComputer threads, before this commit, update status
and other computer specific variables even when the user has closed
the UMC module computer room web page. This also keeps the
VNC Connection between the Veyon Proxy and the monitored computer alive.
As sometimes sessions are not reused and have a long timeout
(see Variable umc/module/timeout) this may lead to significantly
increased traffic.
With this commit, if the user closes the UMC module web page,
the VeyonComputer thread will not ask for updates when 30 seconds have
passed. With default settings, after further 60 seconds, the VNC
connection will be closed by the Veyon Proxy.
Comment 7 Jürn Brodersen univentionstaff 2024-09-26 12:04:01 CEST
What I tested:


lsof shows less connections -> OK
No more auth popup after restarting veyon on windows -> OK
No tracebacks/crashes if veyon is down -> OK
update thread is paused and restarts -> OK
After starting veyon again computer information is updated again as well -> OK
Comment 8 Johannes Königer univentionstaff 2024-09-26 13:12:44 CEST
Errata updates for UCS@school 5.0 v6 have been released.

https://docs.software-univention.de/ucsschool-changelog/5.0v6/en/changelog.html
https://docs.software-univention.de/ucsschool-changelog/5.0v6/de/changelog.html

If this error occurs again, please clone this bug.