Bug 51167 - Improve logging in exam mode
Improve logging in exam mode
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Exam mode
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v5-errata
Assigned To: Daniel Tröder
Ole Schwiegert
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-24 12:36 CEST by Daniel Tröder
Modified: 2020-07-30 15:09 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2020-04-24 12:36:58 CEST
Improve trouble shooting with better log messages.
Comment 1 Daniel Tröder univentionstaff 2020-04-24 14:39:22 CEST
* Logging is now done using Python logging. A handler class writes log messages using univention.debug.
* The package version is now logged.
* The progress is now logged. Before it could only be seen in the UMC or at high log levels.
* Function parameters and the project states are now logged.
* A bug leading to not being able to plan an exam in some cases has been fixed (→ load project in _finish() if unset).

[4.4] bca54fdde Bug #51167: add function to get the version of an installed Debian package
[4.4] c68f15260 Bug #51167: use python logging->UD proxy
[4.4] ddc5e001e Bug #51167: remove translations for log messages
[4.4] 22aae3f0f Bug #51167: add __repr__ methods to Project and _Dict
[4.4] 1e7cd1f0d Bug #51167: refactor package version logging
[4.4] 4c1b14622 Bug #51167: log progress
[4.4] 672a1dc6a Bug #51167: log function parameters and project state
[4.4] 5f384d9cb Bug #51167: changelog and advisories
[4.4] d0f721409 Bug #51167: advisory update
Comment 2 Ole Schwiegert univentionstaff 2020-04-24 15:42:27 CEST
Installed packages:

python-ucs-school:
  Installed: 12.1.11A~4.4.0.202004241504

ucs-school-umc-exam:
  Installed: 9.0.1-35A~4.4.0.202004241437

ucs-school-umc-distribution:
  Installed: 17.0.1-8A~4.4.0.202004241433

Advisory: OK
Changelog: OK
Changes:

The logging looks really good and I think we will have much better information in case there are problems with the exam mode again.

You added
my.project = self._save_exam(request, update=False, ldap_user_read=ldap_user_read)
to the _finish method of start_exam. If for any reason the project file exists already and the my.project was set to None

This we cannot do (as discussed in the meeting) and should be done in context of Bug #51166

Please remove this addition.
Comment 3 Daniel Tröder univentionstaff 2020-04-24 17:35:50 CEST
The code has been changed to not save incomplete exams in case of an error in _thread().

A safer handling has been implemented in Bug #51166.

[4.4] b1c8d745c Bug #51167: don't save incomplete exam in case of prior error
[4.4] f751b0a15 Bug #51166: advisory update

ucs-school-umc-exam (9.0.1-37)
Comment 4 Ole Schwiegert univentionstaff 2020-04-27 07:41:16 CEST
Advisory&Changelog: OK
Revert of change: OK
Improved logging: OK
Tests: OK
Comment 5 Tobias Wenzel univentionstaff 2020-07-30 15:09:28 CEST
UCS@school X.Y vZ has been released (errata update to the release).

http://docs.software-univention.de/changelog-ucsschool-4.4v5-de.html#changelog:ucsschool:2020-04-27

If this error occurs again, please clone this bug.