Bug 52654 - fix 90_ucsschool/101_exam_mode_uids
fix 90_ucsschool/101_exam_mode_uids
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: ucs-test
UCS@school 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Daniel Tröder
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-01-14 08:58 CET by Daniel Tröder
Modified: 2021-05-11 15:47 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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 Daniel Tröder univentionstaff 2021-01-14 08:58:14 CET
Fails on DC slave:

https://jenkins.knut.univention.de:8181/job/UCSschool-4.4/job/Install%20Multiserver/lastBuild/Config=s4,TestGroup=base1,UCSRelease=public/testReport/junit/90_ucsschool/101_exam_mode_uids/slave2032/

(2021-01-14 02:23:11.584393) Traceback (most recent call last):
(2021-01-14 02:23:11.584417)   File "101_exam_mode_uids.py", line 129, in main
(2021-01-14 02:23:11.584440)     check_uids(exam_member_dns, open_ldap_co)
(2021-01-14 02:23:11.584456)   File "101_exam_mode_uids.py", line 30, in check_uids
(2021-01-14 02:23:11.584470)     user_name = open_ldap_co.getAttr(dn, "uid")[0]
(2021-01-14 02:23:11.584483) IndexError: list index out of range
Comment 1 Tobias Wenzel univentionstaff 2021-05-11 15:47:26 CEST
univention-app info
UCS: 4.4-8 errata969
Installed: cups=2.2.1 samba4=4.10 squid=3.5 ucsschool=4.4 v9 ucsschool-veyon-proxy=1.1


I could reproduce the error multiple times and found at least one mistake

if set(attrs.keys()).issubset(set(get_attrs))

get_attrs = ["uid", "uidNumber", "homeDirectory"]
set().issubset(set(get_attrs))
True

This means the loop was never entered.

[4.4] 1d6506971 Bug #52654: correct set operation

Package: ucs-test-ucsschool
Version: 6.0.222A~4.4.0.202105111544
Branch: ucs_4.4-0
Scope: ucs-school-4.4

This did _not_ fix the bug, but rather the helper-code.


-------

I also found that 

except noObject:
      print("Not yet replicated: {!r}".format(dn))

is never entered, only the else branch "Replication incomplete". When starting the second exam the exam-users are not replicated to the replication node - most of the time.

We already have this code to wait for the replication before this error is raised

wait_for_drs_replication(filter_format("cn=exam-%s", (stu,)))
wait_for_drs_replication(filter_format("cn=exam-%s", (student2.name,)))
utils.wait_for_replication()
wait_for_s4connector()