Bug 50859 - Starting exam mode shows 2 Warnings and an error
Starting exam mode shows 2 Warnings and an error
Status: RESOLVED DUPLICATE of bug 50818
Product: UCS@school
Classification: Unclassified
Component: UMC - Exam mode
UCS@school 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-02-27 14:44 CET by Christina Scheinig
Modified: 2020-03-02 15:02 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.114
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2020022721000262
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 Christina Scheinig univentionstaff 2020-02-27 14:44:46 CET
A customer had trouble starting the exam mode on one of his school slaves. He got this error on the UMC:

HTTPError: 591 on master.schule.somewhere.me
(command/schoolexam-master/add-exam-users-to-groups): {"status": 591,
"message": "Interner Server-Fehler in
\"schoolexam-master/add-exam-users-to-groups\".", "traceback": "Interner
Server-Fehler in \"schoolexam-master/add-exam-users-to-groups\".\nRequest:
schoolexam-master/add-exam-users-to-groups\n\nTraceback (most recent call
last):\n File
\"/usr/lib/python2.7/dist-packages/univention/management/console/base.py\",
line 358, in __error_handling\n six.reraise(etype, exc, etraceback)\n File
\"/usr/lib/python2.7/dist-packages/univention/management/console/base.py\",
line 261, in execute\n function.__func__(self, request, *args, **kwargs)\n
File
\"/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py\",
line 181, in _response\n return function(self, request)\n File
\"/usr/lib/pymodules/python2.7/ucsschool/lib/school_umc_ldap_connection.py\",
line 123, in wrapper_func\n return func(*args, **kwargs)\n File
\"/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolexam-master/__init__.py\",
line 380, in add_exam_users_to_groups\n
groups[udm_ori_student['primaryGroup']].setdefault('dns',
set()).add(exam_student.dn)\nAttributeError: 'NoneType' object has no
attribute 'dn'", "location":
"[1]https://master.schule.somewhere.me/univention/command"} 
--------------------------------------------------------------------------------------------------------------------------------
Slave
univention-app info
UCS: 4.4-3 errata413
Installed: dhcp-server=12.0 samba4=4.10 squid=3.5 ucsschool=4.4 v4 

Master
UCS: 4.4-3 errata413
Installed: dhcp-server=12.0 nagios=4.3 pkgdb=11.0 samba4=4.10 self-service=4.0 ucsschool=4.4 v4
-----------------------------------------------------------------------------------------------------------------------------------

In the  management-console-module-schoolexam.log you can see:

-----------------------------------------------------------------------------------------------------------------------------------------

14.02.20 10:12:54.512  MODULE      ( PROCESS ) : Vorbereitung der Klassenarbeitskonten - Seltzer, Maren (m.seltzer3)
14.02.20 10:12:54.622  MODULE      ( WARN    ) : Could not create exam user account for 'uid=m.seltzer3,cn=lehrer,cn=users,ou=sun,dc=schule,dc=somewhere,dc=me': 400 on master.
schule.somewhere.me (command/schoolexam-master/create-exam-user): {"status": 400, "message": "Sch\u00fcler u'uid=m.seltzer3,cn=lehrer,cn=users,ou=sun,dc=schule,dc=somewhere,dc=m
e' nicht gefunden.", "traceback": null, "location": "https://master.schule.somewhere.me/univention/command"} 
-----------------------------------------------------------------------------------------------------------------------------------------
14.02.20 10:14:22.946  MODULE      ( PROCESS ) : Vorbereitung der Klassenarbeitskonten - beendet...
14.02.20 10:14:22.946  MODULE      ( WARN    ) : Vorbereitung der Klassenarbeitskonten - HTTPError: 591 on master.schule.somewhere.me (command/schoolexam-master/add-exam-users-to-groups): {"status": 591, "message": "Interner Server-Fehler in \"schoolexam-master/add-exam-users-to-groups\".", "traceback": "Interner Server-Fehler in \"schoolexam-master/add-exam-users-to-groups\".\nRequest: schoolexam-master/add-exam-users-to-groups\n\nTraceback (most recent call last):\n  File \"/usr/lib/python2.7/dist-packages/univention/management/console/base.py\", line 358, in __error_handling\n    six.reraise(etype, exc, etraceback)\n  File \"/usr/lib/python2.7/dist-packages/univention/management/console/base.py\", line 261, in execute\n    function.__func__(self, request, *args, **kwargs)\n  File \"/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py\", line 181, in _response\n    return function(self, request)\n  File \"/usr/lib/pymodules/python2.7/ucsschool/lib/school_umc_ldap_connection.py\", line 123, in wrapper_func\n    return func(*args, **kwargs)\n  File \"/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolexam-master/__init__.py\", line 380, in add_exam_users_to_groups\n    groups[udm_ori_student['primaryGroup']].setdefault('dns', set()).add(exam_student.dn)\nAttributeError: 'NoneType' object has no attribute 'dn'", "location": "https://master.schule.somewhere.me/univention/command"}

14.02.20 10:14:22.964  MODULE      ( INFO    ) : trying to purge projectfile [/var/lib/ucs-school-umc-schoolexam/Testarbeit] and cachedir [/var/lib/ucs-school-umc-schoolexam/Testarbeit.data]
14.02.20 10:14:22.965  MODULE      ( PROCESS ) : Interner Server-Fehler in "schoolexam/exam/start".
------------------------------------------------------------------------------------------------------------------------------------------
14.02.20 10:16:45.925  LDAP        ( INFO    ) : uldap.search filter=(&(cn=*)(|(objectClass=univentionGroup)(objectClass=sambaGroupMapping))(uniqueMember=uid=exam-charly1,cn=examusers,ou=sun,dc=schule,dc=somewhere,dc=me)) base= scope=sub attr=['dn'] unique=0 required=0 timeout=-1 sizelimit=0
14.02.20 10:16:45.926  LDAP        ( INFO    ) : uldap.search filter=(&(cn=*)(|(objectClass=posixGroup)(objectClass=sambaGroupMapping))(gidNumber=5220)) base= scope=sub a
ttr=['dn'] unique=0 required=0 timeout=-1 sizelimit=0
14.02.20 10:16:46.012  MODULE      ( ERROR   ) : Traceback (most recent call last):
  File "/usr/sbin/univention-management-console-module", line 121, in <module>
    notifier.loop()
  File "/usr/lib/python2.7/dist-packages/notifier/nf_generic.py", line 296, in loop
    step()
  File "/usr/lib/python2.7/dist-packages/notifier/nf_generic.py", line 287, in step
    __min_timer = dispatch.dispatcher_run()
  File "/usr/lib/python2.7/dist-packages/notifier/dispatch.py", line 75, in dispatcher_run
    if not disp():
  File "/usr/lib/python2.7/dist-packages/notifier/threads.py", line 161, in _simple_threads_dispatcher
    task.announce()
  File "/usr/lib/python2.7/dist-packages/notifier/threads.py", line 139, in announce
    self._callback(self, self._result)
  File "/usr/lib/python2.7/dist-packages/notifier/__init__.py", line 104, in __call__
    return self._function(*tmp, **self._kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolexam/__init__.py", line 557, in _finished
    my.project.starttime = datetime.datetime.now()
AttributeError: 'NoneType' object has no attribute 'starttime'


--------------------------------------------------------------------------------------
Comment 1 Jürn Brodersen univentionstaff 2020-03-02 15:00:04 CET
Since bug 50818 this traceback is caught and reraised with the uid of the faulty user:

'''
HTTPError: 591 on master.schule.somewhere.me
(command/schoolexam-master/add-exam-users-to-groups): {"status": 591,
"message": "Interner Server-Fehler in
\"schoolexam-master/add-exam-users-to-groups\".", "traceback": "Interner
Server-Fehler in \"schoolexam-master/add-exam-users-to-groups\".\nRequest:
schoolexam-master/add-exam-users-to-groups\n\nTraceback (most recent call
last):\n File
\"/usr/lib/python2.7/dist-packages/univention/management/console/base.py\",
line 358, in __error_handling\n six.reraise(etype, exc, etraceback)\n File
\"/usr/lib/python2.7/dist-packages/univention/management/console/base.py\",
line 261, in execute\n function.__func__(self, request, *args, **kwargs)\n
File
\"/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py\",
line 181, in _response\n return function(self, request)\n File
\"/usr/lib/pymodules/python2.7/ucsschool/lib/school_umc_ldap_connection.py\",
line 123, in wrapper_func\n return func(*args, **kwargs)\n File
\"/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolexam-master/__init__.py\",
line 380, in add_exam_users_to_groups\n
groups[udm_ori_student['primaryGroup']].setdefault('dns',
set()).add(exam_student.dn)\nAttributeError: 'NoneType' object has no
attribute 'dn'", "location":
'''

This hass been changed together with bug 50588. Where this was a problem with multi school users and users that were deleted but still in a group.

*** This bug has been marked as a duplicate of bug 50818 ***
Comment 2 Jürn Brodersen univentionstaff 2020-03-02 15:01:22 CET
Please reopen if the subsequent fixes in 50819 did not help. (slave and master server should be updated)
Comment 3 Jürn Brodersen univentionstaff 2020-03-02 15:02:37 CET
(In reply to Jürn Brodersen from comment #2)
> Please reopen if the subsequent fixes in 50819 did not help. (slave and
> master server should be updated)

Not released yet, sorry