Bug 35168 - after exam mode crashes, no exam could be started until manual cleanup
after exam mode crashes, no exam could be started until manual cleanup
Status: RESOLVED WONTFIX
Product: UCS@school
Classification: Unclassified
Component: UMC - Exam mode
unspecified
Other Linux
: P5 normal (vote)
: UCS@school 3.2.x
Assigned To: UCS@school maintainers
:
Depends on: 31539 35261
Blocks: 44157
  Show dependency treegraph
 
Reported: 2014-06-19 15:12 CEST by Tobias Birkefeld
Modified: 2019-02-05 21:25 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
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
error log (2.29 MB, text/plain)
2014-06-23 10:18 CEST, Tobias Birkefeld
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Birkefeld univentionstaff 2014-06-19 15:12:54 CEST
When during the start of an exam due to some problems the schoolexam-module crashed, lots of data a still in LDAP and/or AD. These data (for example the exam-users) prohibit a start of a new exam. In the log is following message:

10.06.14 15:38:33.640  MODULE      ( ERROR   ) : replication timeout - 1 user objects missing: set(['uid=exam-testuser-01,cn=examusers,ou=example_school,dc=example,dc=com']) 
10.06.14 15:38:33.640  MODULE      ( ERROR   ) : Replikations-Timeout: Nicht alle Klassenarbeitskonten konnten erstellt werden
10.06.14 15:38:33.687  MODULE      ( PROCESS ) : Einrichten der Heimatverzeichnisse - beendet...
10.06.14 15:38:33.688  MODULE      ( ERROR   ) : Exception during start_exam:   File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolexam/__init__.py", line 280, in _thread
    raise UMC_CommandError(msg)

UMC_CommandError: Replikations-Timeout: Nicht alle Klassenarbeitskonten konnten erstellt werden
10.06.14 15:38:33.688  MODULE      ( WARN    ) : Einrichten der Heimatverzeichnisse - Ein unerwarteter Fehler trat währende der Vorbereitung auf: Replikations-Timeout: Nicht alle Klassenarbeitskonten konnten erstellt werden

In this state the exam mode is not usable for the school until all exam-users and the user and computer references in the "Klassenarbeit"-group will be deleted.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2014-06-19 16:10:57 CEST
@Tobias: can you provide more information which error occurs on the second exam start attempt when "debris" is left from the failed first attempt?
Comment 2 Tobias Birkefeld univentionstaff 2014-06-23 10:18:48 CEST
Created attachment 5969 [details]
error log

This error is shown when netlogon scripts are still there (also reported in #31539):

Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/ucs-school-user-logonscript.py", line 514, in handler
    userchange(dn, new, old)
  File "/usr/lib/univention-directory-listener/system/ucs-school-user-logonscript.py", line 504, in userchange
    os.remove("%s/%s.vbs" % (path, old['uid'][0]))
OSError: [Errno 13] Permission denied: '/var/lib/samba/netlogon/user/exam-adsy-test-16.vbs'
20.06.14 14:51:17.848  LISTENER    ( WARN    ) : at least one delete handler failed


and in attached file management-console-module-schoolexam.log is the error, when still exam users are in ldap on master, but not synchronized to slave due to the netlogon error above.
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2014-06-24 09:10:38 CEST
(In reply to Tobias Birkefeld from comment #2)
[…]
> "/usr/lib/univention-directory-listener/system/ucs-school-user-logonscript.
> py", line 504, in userchange
>     os.remove("%s/%s.vbs" % (path, old['uid'][0]))
> OSError: [Errno 13] Permission denied:
> '/var/lib/samba/netlogon/user/exam-adsy-test-16.vbs'
> 20.06.14 14:51:17.848  LISTENER    ( WARN    ) : at least one delete handler
> failed

This is only a cosmetic problem and does not affect the exam mode itself. As mentioned it is handled via bug 31539.

> and in attached file management-console-module-schoolexam.log is the error,
> when still exam users are in ldap on master, but not synchronized to slave
> due to the netlogon error above.

From the attached file:

10.06.14 15:27:51.331  MODULE      ( WARN    ) : Could not open user object uid=exam-user-11,cn=examusers,ou=school01,dc=example,dc=com ... ignoring:
Die Eigenschaft Primäre Gruppe wird benötigt.

Can you provide a ldapsearch of the mentioned user object?
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2014-06-24 09:12:54 CEST
Is it a single server or a multi server environment? Is there more than one slave?
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2014-06-24 09:22:29 CEST
Sidenote:
The following warning message is printed in the distribution module code and has no severe impact on the exam mode but may indicate problems:

10.06.14 15:27:51.331  MODULE      ( WARN    ) : Could not open user object uid=exam-user-11,cn=examusers,ou=school01,dc=example,dc=com ... ignoring:
Die Eigenschaft Primäre Gruppe wird benötigt.

The log file indicates that there is a problem with the replication. Does the affected system maintain a LDAP index for the "entryUUID" attribute? (→ UCR variables have been set accordingly and slapindex has been called while slapd was stopped?)
Comment 6 Jan Christoph Ebersbach univentionstaff 2014-07-06 17:25:19 CEST
A customer reported for a different setup the very same problem.  His observation was that the exam mode just runs once and than fails to start again.
Comment 7 Jan Christoph Ebersbach univentionstaff 2014-07-07 13:48:30 CEST
What Tobias found out here is actually the reason why the exam mode works just once!  See Ticket #2014062621000429 and Bug #35261.

(In reply to Tobias Birkefeld from comment #2)
> Created attachment 5969 [details]
> error log
> 
> This error is shown when netlogon scripts are still there (also reported in
> #31539):
> 
> Traceback (most recent call last):
>   File
> "/usr/lib/univention-directory-listener/system/ucs-school-user-logonscript.
> py", line 514, in handler
>     userchange(dn, new, old)
>   File
> "/usr/lib/univention-directory-listener/system/ucs-school-user-logonscript.
> py", line 504, in userchange
>     os.remove("%s/%s.vbs" % (path, old['uid'][0]))
> OSError: [Errno 13] Permission denied:
> '/var/lib/samba/netlogon/user/exam-adsy-test-16.vbs'
> 20.06.14 14:51:17.848  LISTENER    ( WARN    ) : at least one delete handler
> failed
> 
> 
> and in attached file management-console-module-schoolexam.log is the error,
> when still exam users are in ldap on master, but not synchronized to slave
> due to the netlogon error above.
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2014-07-07 16:37:24 CEST
(In reply to Jan Christoph Ebersbach from comment #7)
> What Tobias found out here is actually the reason why the exam mode works
> just once!  See Ticket #2014062621000429 and Bug #35261.

That might be a possible reason. This bug will be closed, if the fix in Bug #35261 is confirmed as a proper solution.
Comment 9 Florian Best univentionstaff 2017-06-28 14:56:34 CEST
There is a Customer ID set so I set the flag "School Customer affected".
Comment 10 Sönke Schwardt-Krummrich univentionstaff 2019-02-05 21:25:36 CET
This issue has been filled against UCS@school 3.2. The maintenance with
bug and security fixes for UCS@school 3.2 has ended on Dec 31, 2016.

Customers still on UCS 3.x are encouraged to update to UCS 4.3 (or later). 
Please contact your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug"
or simply reopen the issue. In this case please provide detailed information on
how this issue is affecting you.