Bug 54886 - 4.4 backport: Verify if Veyon service is available when opening classroom module
4.4 backport: Verify if Veyon service is available when opening classroom module
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Computer room
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v9-errata
Assigned To: Johannes Königer
Tobias Wenzel
https://help.univention.com/t/problem...
:
Depends on: 53421
Blocks:
  Show dependency treegraph
 
Reported: 2022-06-21 11:07 CEST by Tobias Wenzel
Modified: 2022-07-20 13:24 CEST (History)
7 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.571
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support: Yes
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021113021000648, 2021091421000398, 2021060721000255, 2021082321000104, 2021101021000339, 2021101121000186, 2021101121000301, 2021112221000565, 2022031521000887, 2022050521000401, 2022061021000461
Bug group (optional): Error handling, External feedback, Troubleshooting
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Wenzel univentionstaff 2022-06-21 11:07:33 CEST
+++ This bug was initially created as a clone of Bug #53421 +++

A customer reported a problem with the classroom. Opening ended with traceback

Interner Server-Fehler in "computerroom/room/acquire".
Request: computerroom/room/acquire

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/school_umc_ldap_connection.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/__init__.py", line 444, in room_acquire
    success, message, info = self._room_acquire(roomDN, ldap_user_read)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/__init__.py", line 421, in _room_acquire
    self._italc.room = roomDN
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/room_management.py", line 763, in room
    self._clear()
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/room_management.py", line 814, in _clear
    computer.close()
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/room_management.py", line 1198, in close
    self._veyon_client.remove_session(ip_address)
  File "/usr/lib/pymodules/python2.7/ucsschool/veyon_client/client.py", line 143, in remove_session
    headers={"Connection-Uid": session_uid},
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 150, in delete
    return request('delete', url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost'

The Veyon service was not running. From my point of view it would be a good idea to check the Veyon services when opening the classroom module to avoid this traceback and inform the user about the problem with the service.
Comment 1 Johannes Königer univentionstaff 2022-06-23 09:26:52 CEST
Proposed changes: See merge request https://git.knut.univention.de/univention/ucsschool/-/merge_requests/122/. This is a backport to 4.4 of the changes made with the merge request https://git.knut.univention.de/univention/ucsschool/-/merge_requests/119 in the 5.0 branch.

Tested on a `UCS: 4.4-9+e1216 amd64 - generic-unsafe` template, same expected behavior observed as with UCS 5.

The only difference to the above mentioned merge request 119 is line 420 (in commit 434839dfc8654969409f9c3d772133cec45da4e5) in `ucs-school-umc-computerroom/umc/python/computerroom/__init__.py` as the attribute for the `ComputerRoomManager` was named `_italc` instead of `_computerroom`.
Comment 2 Tobias Wenzel univentionstaff 2022-06-28 09:10:50 CEST
QA (4.4)

- [x] code ok: see mr https://git.knut.univention.de/univention/ucsschool/-/merge_requests/122
- [x] changelogs ok
- [x] manual test
- [x] jenkins

before fix


Die Anfrage konnte nicht bearbeitet werden.
Interner Server-Fehler in "computerroom/room/acquire".

in /var/log/univention/management-console-module-computerroom.log 

 Max retries exceeded with url: /api/v1/authentication/10.207.55.232 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f32105f16d8>: Failed to establish a new connection: [Errno 111] Verbindungsaufbau abgelehnt'))


after the fix


Die Anfrage konnte nicht ausgeführt werden.
Rechner in den Computerräumen können momentan nicht ferngesteuert werden, da die Kommunikation mit dem Veyon WebAPI Server fehlgeschlagen ist. Es ist möglich dass der zugehörige Service nicht aktiv ist. Bitte kontaktieren Sie den Systemadministrator.

in /var/log/univention/management-console-module-computerroom.log 

21.06.22 13:47:22.134  MODULE      ( PROCESS ) : Rechner in den Computerräumen können momentan nicht ferngesteuert werden, da die Kommunikation mit dem Veyon WebAPI Server fehlgeschlagen ist. Es ist möglich dass der zugehörige Service nicht aktiv ist. Bitte kontaktieren Sie den Systemadministrator.


The italc computer room still works (error is only thrown if veyon backend is used).

When switching from veyon to italc, the session has to be reloaded because the backend is otherwise still set to veyon.


...maybe you can put the changelos + advisory in one or two commits :)
usually fewer commits are enough: code changes in package, changelog + advisory, test, docu


[4.4] 6dbfab83b Bug #54886: ucs-school-veyon-client yaml advisory update
[4.4] 8123abd9a Bug #54886: ucs-school-umc-computerroom yaml advisory update
[4.4] b55277225 Bug #54886: python-typing added to Build-Depends
[4.4] 56f2d5bdb Bug #54886: ucs-school-veyon-client yaml advisory update
[4.4] b4a3df2d4 Bug #54886: ucs-school-umc-computerroom yaml advisory update
[4.4] 1e69c3e8d Bug #54886: ucs-school-veyon-client debian changelog update
[4.4] f35b77363 Bug #54886: ucs-school-umc-computerroom debian changelog update
[4.4] 1e99480de Bug #54886: Added translation for error message.
[4.4] ab9601d4c Bug #54886: Additional unit test.
[4.4] 5131eb216 Bug #54886: Veyon Server connection test added.
Comment 3 Tobias Wenzel univentionstaff 2022-07-20 13:24:01 CEST
Errata updates for UCS@school 4.4 v9 have been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v9-de.html

If this error occurs again, please clone this bug.