Bug 57708 - UCS@school exam-mode creates error - FileNotFoundError: [Errno 2] Datei oder Verzeichnis nicht gefunden
Summary: UCS@school exam-mode creates error - FileNotFoundError: [Errno 2] Datei oder ...
Status: REOPENED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: UMC - Computer room
Version: UCS@school 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: UCS@school maintainers
QA Contact:
URL:
Keywords:
Depends on: 57661
Blocks:
  Show dependency treegraph
 
Reported: 2024-10-29 16:59 CET by Mirac Erdemiroglu
Modified: 2025-02-20 18:04 CET (History)
5 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?: 3: Will affect average number of 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.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2024100221000214, 2024121021000179, 2025021221000076
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 Mirac Erdemiroglu univentionstaff 2024-10-29 16:59:33 CET
+++ This bug was initially created as a clone of Bug #57661 +++

UCS: 5.0-9 errata1145
Installed: cups=2.2.1 dhcp-server=12.0 samba4=4.16 self-service=5.0 squid=3.5 ucsschool=5.0 v6 ucsschool-veyon-proxy=4.9.0.8-ucs1
Upgradable: 

Settings:

veyon/WebAPI/ConnectionLimit: 5000 (Maximum number of connections for the veyon WebAPI)
veyon/WebAPI/ConnectionIdleTimeout: 60 (Sets timeout for idling connections, in seconds. Reducing this value can help to avoid unnecessary VNC connections between the proxy and the Windows clients.)
veyon/Core/ComputerStatePollingInterval: 1000 (Polling interval for state changes in milliseconds)
veyon/Master/ComputerMonitoringUpdateInterval: 1000 (Update interval for the created thumbnail in milliseconds.)
veyon/Master/ComputerMonitoringImageQuality: 4 (Sets the image quality value 0 (highest) to 4 (lowest).)

ucsschool/umc/computerroom/screenshot/interval: 5
ucsschool/umc/computerroom/update-interval: 1
Collecting results dont work anymore i get the following error message in the UCM. The results will not been collect in the teachers shares.

Interner Server-Fehler in "schoolexam/exam/collect".
Request: schoolexam/exam/collect

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/management/console/base.py", line 388, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/univention/management/console/base.py", line 285, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/decorators.py", line 189, in _response
    return function(self, request)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/decorators.py", line 478, in _response
    result = _multi_response(self, request)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/decorators.py", line 189, in _response
    return function(self, request)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/decorators.py", line 602, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/decorators.py", line 444, in _fake_func
    yield function(self, *args)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/schoolexam/__init__.py", line 827, in collect_exam
    project.collect()
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/distribution/util.py", line 756, in collect
    available_space = self._get_available_space()
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/distribution/util.py", line 689, in _get_available_space
    statvfs = os.statvfs(self.sender_projectdir)
FileNotFoundError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/home/mejneschool2/lehrer/s.gohmann/Klassenarbeiten/Univention-Test-Ergebnisse'


schoolexam.log


29.10.24 16:37:57.335  MODULE      ( PROCESS ) : collect_exam:825  loaded project=Project(name='Univention-Test') dict={'name': 'Univention-Test', 'description': 'Univention-Test', 'files': ['basistrainingtextve
rs.pdf', 'atmatbeispiel.pdf', 'Tux.svg.png', 'Redhat.jpg', 'Linux_kernel.txt'], 'starttime': '2024-10-29 16:33', 'deadline': '17:17', 'atJobNumDistribute': None, 'atJobNumCollect': None, 'sender': {'unixhome': '
/home/mejneschool2/lehrer/s.gohmann', 'username': 's.gohmann', 'uidNumber': '2728', 'gidNumber': '5305', 'firstname': 'Stefan', 'lastname': 'Gohmann', 'dn': 'uid=s.gohmann,cn=lehrer,cn=users,ou=mejneschool2,dc=u
cs5schoolhejne,dc=intranet', '__type__': 'USER'}, 'recipients': [{'unixhome': '/home/mejneschool2/schueler/exam-homes/exam-emel.erde.20241029-163306', 'username': 'exam-emel.erde', 'uidNumber': '2845', 'gidNumbe
r': '5305', 'firstname': 'Emel', 'lastname': 'Erde', 'dn': 'uid=exam-emel.erde,cn=examusers,ou=mejneschool2,dc=ucs5schoolhejne,dc=intranet', '__type__': 'USER'}, {'unixhome': '/home/mejneschool2/schueler/exam-ho
mes/exam-ingemar.dier.20241029-163305', 'username': 'exam-ingemar.dier', 'uidNumber': '2844', 'gidNumber': '5305', 'firstname': 'Ingemar', 'lastname': 'Diercker', 'dn': 'uid=exam-ingemar.dier,cn=examusers,ou=mej
neschool2,dc=ucs5schoolhejne,dc=intranet', '__type__': 'USER'}, {'unixhome': '/home/mejneschool2/schueler/exam-homes/exam-esra.erde.20241029-163305', 'username': 'exam-esra.erde', 'uidNumber': '2843', 'gidNumber
': '5305', 'firstname': 'Esra', 'lastname': 'Erde', 'dn': 'uid=exam-esra.erde,cn=examusers,ou=mejneschool2,dc=ucs5schoolhejne,dc=intranet', '__type__': 'USER'}, {'unixhome': '/home/mejneschool2/schueler/exam-hom
es/exam-mirac.erde.20241029-163306', 'username': 'exam-mirac.erde', 'uidNumber': '2846', 'gidNumber': '5305', 'firstname': 'Mirac', 'lastname': 'Erde', 'dn': 'uid=exam-mirac.erde,cn=examusers,ou=mejneschool2,dc=
ucs5schoolhejne,dc=intranet', '__type__': 'USER'}], 'isDistributed': True, 'room': 'cn=mejneschool2-Raum 1,cn=raeume,cn=groups,ou=mejneschool2,dc=ucs5schoolhejne,dc=intranet', '__type__': 'PROJECT'}
29.10.24 16:37:57.336  MODULE      ( ERROR   ) : Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/distribution/util.py", line 508, in _create_project_dir
    os.makedirs(projectdir, 0o700)
  File "/usr/lib/python3.7/os.py", line 221, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 1] Operation not permitted: '/home/mejneschool2/lehrer/s.gohmann/Klassenarbeiten/Univention-Test-Ergebnisse'

29.10.24 16:37:57.336  MODULE      ( ERROR   ) : failed to create/chown '/home/mejneschool2/lehrer/s.gohmann/Klassenarbeiten/Univention-Test-Ergebnisse': [Errno 1] Operation not permitted: '/home/mejneschool2/le
hrer/s.gohmann/Klassenarbeiten/Univention-Test-Ergebnisse'
29.10.24 16:37:57.379  MODULE      ( PROCESS ) : Internal server error during "schoolexam/exam/collect".
29.10.24 16:37:57       ERROR      (     2045) : 591 POST /univention/command/schoolexam/exam/collect (0.0.0.0) 48.28ms
Comment 1 Jan-Luca Kiok univentionstaff 2024-10-30 11:16:29 CET
Thanks for the report. We analyzed the problem and came to the following conclusion:

Why does this happen? We use the so called "immutable bit" on exam result folders to prevent students from deleting the folder so that the results are always collected.
Initially this was also done for teachers of the class, which led to Bug #57661. We fixed this by removing the whole immutable routine for teachers.

What now happens is that if you have an environment where the immutable bit was set, but not removed (meaning that the exam crashed and the system is in an inconsistent state) and you update to the latest release this error happens because since the whole routine is missing the bit is not removed anymore (nor set or managed in any way).

To fix this you should be able to remove the immutable bit via "chattr -i <folder>" on the mentioned folder ("/home/mejneschool2/lehrer/s.gohmann/Klassenarbeiten/Univention-Test-Ergebnisse" in your case).

Since we removed the whole code path this should not happen anymore and only affects systems that updated coming from an inconsistent state already we will not change anything here since that would mean re-adding code relating to something we just removed.

If this can be observed in a customers environment and not only on internal testing machines feel free to add that information here, for now I will resolve this issue.