Bug 31389 - Exam user accounts cannot be created
Exam user accounts cannot be created
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Exam mode
unspecified
Other Linux
: P5 normal (vote)
: UCS@school 3.1 R2
Assigned To: Arvid Requate
Alexander Kläser
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-17 12:42 CEST by Alexander Kläser
Modified: 2013-06-07 21:39 CEST (History)
1 user (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

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2013-05-17 12:42:29 CEST
Not quite sure why I cannot create exam user accounts...

> 17.05.13 12:16:18.733  MODULE      ( INFO    ) : Executing ['schoolexam-master/create-exam-user']
> 17.05.13 12:16:18.741  ADMIN       ( INFO    ) : LOCK acquireUnique scope = domain
> 17.05.13 12:16:18.751  ADMIN       ( INFO    ) : ALLOCATE return exam-marlene7
> 17.05.13 12:16:18.751  ADMIN       ( INFO    ) : ALLOCATE: Start allocation for type = uidNumber
> 17.05.13 12:16:18.751  ADMIN       ( INFO    ) : ALLOCATE: Start ID = ['2932']
> 17.05.13 12:16:18.751  ADMIN       ( INFO    ) : ALLOCATE: Set Start ID 2933
> 17.05.13 12:16:18.751  ADMIN       ( INFO    ) : ALLOCATE: Lock ID 2933
> 17.05.13 12:16:18.761  ADMIN       ( INFO    ) : ALLOCATE: searchfor uidNumber=2933
> 17.05.13 12:16:18.762  ADMIN       ( INFO    ) : ALLOCATE: Return ID 2933
> 17.05.13 12:16:18.763  ADMIN       ( INFO    ) : ALLOCATE: request user sid. SID = S-1-5-21-1546627211-3112513479-1411413579-6866
> 17.05.13 12:16:18.763  ADMIN       ( INFO    ) : LOCK acquireUnique scope = base
> 17.05.13 12:16:18.763  ADMIN       ( INFO    ) : LOCK univention.admin.locking.lock scope = base
> 17.05.13 12:16:18.785  MODULE      ( PROCESS ) : The command has failed: ERROR: Creation of exam user account failed
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolexam-master/__init__.py", line 209, in create_exam_user
>     raise UMC_CommandError( message )
> UMC_CommandError: Failed to allocate userSid
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolexam-master/__init__.py", line 206, in create_exam_user
>     userSid = univention.admin.allocators.requestUserSid(ldap_admin_write, ldap_position, uidNum)
>   File "/usr/lib/pymodules/python2.6/univention/admin/allocators.py", line 75, in requestUserSid
>     return request(lo, position, 'sid', sid)
>   File "/usr/lib/pymodules/python2.6/univention/admin/allocators.py", line 166, in request
>     return acquireUnique(lo, position, type, value, _type2attr[type], scope = _type2scope[type])
>   File "/usr/lib/pymodules/python2.6/univention/admin/allocators.py", line 155, in acquireUnique
>     univention.admin.locking.lock(lo, position, type, value, scope=scope)
>   File "/usr/lib/pymodules/python2.6/univention/admin/locking.py", line 93, in lock
>     raise univention.admin.uexceptions.noLock
> noLock
>
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2013-05-17 12:45:24 CEST
The SID S-1-5-21-1546627211-3112513479-1411413579-6866 seems to be already in use.

univention-ldapsearch -x \
  sambaSID=S-1-5-21-1546627211-3112513479-1411413579-6866
Comment 2 Arvid Requate univentionstaff 2013-05-22 15:09:56 CEST
The rid allocation code in schoolexam-master bailed out if rid allocation according to the default UDM algorithm failed. This was triggered by bug 31416.
The module now employs the retry logic of users/user.
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2013-05-22 17:30:58 CEST
22.05.13 17:30:03.575  MODULE      ( PROCESS ) : Das Kommando ist fehlgeschlagen: FEHLER: Anlegen des Klassenarbeitsbenutzerkontos fehlgeschlagen
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolexam-master/__init__.py", line 209, in create_exam_user
    if not userSid or userSid == 'None':
UnboundLocalError: local variable 'userSid' referenced before assignment
Comment 4 Arvid Requate univentionstaff 2013-05-22 17:44:45 CEST
fixed.
Comment 5 Alexander Kläser univentionstaff 2013-05-28 15:21:54 CEST
QA: Ok, the problem did not occur again in my tests, the code is identical to the one in users/user.py. Changelog OK. → VERIFIED
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2013-06-07 21:39:51 CEST
UCS@school 3.1 R2 has been released:
http://download.univention.de/doc/release-notes-ucsschool-3.1-rev2.pdf

If this error occurs again, please use "Clone This Bug".