Univention Bugzilla – Bug 57367
Exam mode failes - RuntimeError: Unable to load default file
Last modified: 2024-07-02 17:10:36 CEST
UCS: 5.0-6 errata904 Installed: cups=2.2.1 dhcp-server=12.0 prometheus-node-exporter=2.0.1 radius=5.0 samba4=4.16 self-service=5.0 squid=3.5 ucsschool=5.0 v4 4.4/ucsschool-veyon-proxy=4.7.4.14-0 Upgradable: The exam mode is terminated unexpectedly and the error message is Unable to load default file. It would certainly help to explain which file is the default file, where it is located and why it could not be loaded. In addition, in my opinion, the exam mode should not simply be canceled, but wait for it or try again to start the class work successfully so that it can be run. 15.05.24 07:42:19.530 MODULE ( PROCESS ) : Received request 'schoolexam/progress': ('m.erde', None, None, 'de_DE.UTF-8') 15.05.24 07:42:19.590 MODULE ( PROCESS ) : _finished:789 result=RuntimeError('Unable to load default file') 15.05.24 07:42:19.590 MODULE ( PROCESS ) : info:75 Vorbereiten der Raumeinstellungen - beendet... 15.05.24 07:42:19.614 MODULE ( INFO ) : creating project cache dir: /var/lib/ucs-school-umc-schoolexam/XXX_AP.data 15.05.24 07:42:19.614 MODULE ( INFO ) : cache dir /var/lib/ucs-school-umc-schoolexam/XXX_AP.data exists. 15.05.24 07:42:19.615 MODULE ( WARN ) : error:79 Vorbereiten der Raumeinstellungen - RuntimeError: Unable to load default file 15.05.24 07:45:37.461 MODULE ( INFO ) : Ping not successfull for e-r300-14 with IP xx.xx.xx.xx 15.05.24 07:45:37.461 MODULE ( INFO ) : e-r300-14: Updating information was not successful. 15.05.24 07:45:37.461 MODULE ( INFO ) : Ping not successfull for e-r300-08 with IP xx.xx.xx.xxx 15.05.24 07:45:37.461 MODULE ( INFO ) : e-r300-08: Updating information was not successful. 15.05.24 07:45:37.494 MODULE ( INFO ) : R300-7R: updating information. 15.05.24 07:45:37.495 MODULE ( INFO ) : R300-8R: updating information. 15.05.24 07:45:37.502 MODULE ( INFO ) : Ping not successfull for R300-1r with IP xx.xx.xx.x 15.05.24 07:45:37.502 MODULE ( INFO ) : R300-1r: Updating information was not successful. 15.05.24 07:45:37.503 MODULE ( PROCESS ) : _finished:789 result=RuntimeError('Unable to load default file') 15.05.24 07:45:37.503 MODULE ( PROCESS ) : info:75 Vorbereiten der Raumeinstellungen - beendet... 15.05.24 07:45:37.505 MODULE ( INFO ) : Ping not successfull for R300-4R with IP xx.xx.xx.x 15.05.24 07:45:37.505 MODULE ( INFO ) : R300-4R: Updating information was not successful. 15.05.24 07:45:37.506 MODULE ( INFO ) : Ping not successfull for R300-6l with IP xx.xx.xx.xx 15.05.24 07:45:37.506 MODULE ( INFO ) : R300-6l: Updating information was not successful. 15.05.24 07:45:37.507 MODULE ( INFO ) : R300-8r: updating information. 15.05.24 07:45:37.510 MODULE ( INFO ) : Ping not successfull for R300-1R with IP xx.x.x.x 15.05.24 07:45:37.510 MODULE ( INFO ) : R300-1R: Updating information was not successful. 15.05.24 07:45:37.512 MODULE ( INFO ) : R300-3L: updating information. 15.05.24 07:45:37.530 MODULE ( INFO ) : Ping not successfull for R300-2L with IP xx.xx.xx.x 15.05.24 07:45:37.530 MODULE ( INFO ) : R300-2L: Updating information was not successful. 15.05.24 07:45:37.581 MODULE ( INFO ) : creating project cache dir: /var/lib/ucs-school-umc-schoolexam/XXX-Theorieprüfung.data 15.05.24 07:45:37.623 MODULE ( INFO ) : R300-3r: updating information. 15.05.24 07:45:37.632 MODULE ( WARN ) : error:79 Vorbereiten der Raumeinstellungen - RuntimeError: Unable to load default file Quote from S.Gohmann: I have just looked at the code of the S4 Listener module. If I understand it correctly, the old file is actually removed before it is rewritten. This means that there is a period of time in which a load would go wrong: https://git.knut.univention.de/univention/ucs/-/blob/5.0-7/services/univention-samba4/samba-shares.py?ref_type=heads#L137 The error must be intercepted and dealt with in the corresponding code.
We had this problem in the past if the samba configuration had an issue: Bug 53464
But in this case, it ran through several times without any problems and then suddenly stopped working. I think it is started per exam user. My suspicion is that there are side effects when the samba share configuration is rewritten.
I opened a bug for the samba shares bug 57374
The share restrictions have a similar problem: bug 57376
Both bug 57374 and bug 57376 should only be a problem in a very short time frame and, as far as I can tell, can only be triggered if somebody works in parallel. Either by changing a share or starting/stopping an exam. I would have expected the odds of this happening to be rather low, so I'm not sure if either of these are the underlying problem. Though I think it still makes sense to fix these bugs just to make sure they are not the problem.
Note: missing files can be printed with samba-tool (the debug-level is important) ``` root@replica1:/etc/samba# samba-tool testparm --debuglevel=2 lpcfg_load: refreshing parameters from /etc/samba/smb.conf Can't find include file /etc/samba/local.config.conf ERROR: Unable to load default file ```
(In reply to Jürn Brodersen from comment #7) > Both bug 57374 and bug 57376 should only be a problem in a very short time > frame and, as far as I can tell, can only be triggered if somebody works in > parallel. Either by changing a share or starting/stopping an exam. > > I would have expected the odds of this happening to be rather low, so I'm > not sure if either of these are the underlying problem. Though I think it > still makes sense to fix these bugs just to make sure they are not the > problem. It could be a side effect / timing issue because a lot is done at the start of an exam. I think it would be very good if you could catch and log the error in such a case and then try again after a few seconds. If it still doesn't work, you can always abort.
BTW: The customer was able to reproduce it once again.
Note: Our fix is not fixing the underlying issue of a broken samba conf. The fix does the following: - Adds a better error message - Adds a retry around loading the samba configuration - The samba configuration is now only loaded once at the startup of the module, which should make it less likely for a customer to run into the problem.
Package update with resolution published on 02.07.2024 for UCS@school 5.0v5. See https://docs.software-univention.de/ucsschool-changelog/5.0v5/en/index.html