Bug 47208

Summary: 70_users_module fails
Product: UCS@school Reporter: Jürn Brodersen <brodersen>
Component: ucs-testAssignee: UCS maintainers <ucsschool-maintainers>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P5 CC: kiok, schwardt
Version: UCS@school 4.3   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
See Also: http://forge.univention.org/bugzilla/show_bug.cgi?id=47282
http://forge.univention.org/bugzilla/show_bug.cgi?id=41864
https://forge.univention.org/bugzilla/show_bug.cgi?id=53720
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:
Bug Depends on:    
Bug Blocks: 47412    

Description Jürn Brodersen univentionstaff 2018-06-19 15:20:49 CEST
70_users_module fails

It looks like wait_for_replication from testing.utils does not wait for replication.

The function wait_for_replication uses the nagios check "check_univention_replication" which is successful (if called without any options) as long as the listener id increased since the last check.

In this case the previous check did not call wait_for_replication after it was done. Now wait_for_replication immediately returned because something got replicated. Resulting in an increasing difference in listener and notifier ids until verify_ldap_object ran into a timeout (because the replication was far behind) and the test failed.
Comment 1 Jürn Brodersen univentionstaff 2018-06-19 16:06:48 CEST
[4.3-1 002c4e749e] Bug #47208: Let wait_for_replication wait until listener and notifier id are equal
Comment 2 Jürn Brodersen univentionstaff 2018-06-20 21:26:53 CEST
And the test still failed... :(

I was using an older version. Which had the previously described problem.
Fun fact: a successful run of 70_users_module increases the notifier id by 441 operations.

The actual problem was introduced in bug 46572. The underlying user testing lib (importusers.py) expects new groups after a school change. The school wizard does not create these. (AFAIK that is the documented behavior for the umc)

[4.3 475b04108] Bug #47208: fix 70_users_module
Comment 3 Jürn Brodersen univentionstaff 2018-07-03 18:09:36 CEST
[4.2 e4465af0d] Bug #47208: fix 70_users_module
Comment 4 Daniel Tröder univentionstaff 2018-07-03 18:33:02 CEST
Looks good to me. Will wait for Jenkins till tomorrow.
Comment 5 Daniel Tröder univentionstaff 2018-07-30 08:24:43 CEST
http://jenkins.knut.univention.de:8080/job/UCSschool-4.3/job/Install%20Singleserver/Config=s4,TestGroup=base1/lastBuild/testReport/90_ucsschool/70_users_module/history/

The test is unstable. It failed in "Install U@S 4.3 Singleserver" / #171 / s4,base1 and #175, but succeeded in #172 - # 174.

Both times it failed were after ">>>> Editing and removing (remove_from_school='t12dw1fhx') 4 users..." with
-----------------------------------------------------------------------------
Traceback (most recent call last):
  File "70_users_module", line 132, in <module>
    main()
  File "70_users_module", line 107, in main
    users = test(student_classes, teacher_classes, [ou, ou2], ucr, ou, connection=umc_connection)
  File "70_users_module", line 63, in test
    wait_for_drs_replication(filter_format('cn=%s', (user.username,)))
  File "/usr/lib/pymodules/python2.7/univention/testing/ucs_samba.py", line 81, in wait_for_drs_replication
    raise DRSReplicationFailed("DRS replication for filter: '%s' failed due to timeout after %d sec." % (ldap_filter, t - t0))
univention.testing.ucs_samba.DRSReplicationFailed: DRS replication for filter: 'cn=lwmthtgzhu' failed due to timeout after 360 sec.
Comment 6 Jürn Brodersen univentionstaff 2018-07-30 09:55:55 CEST
See also bug 47282

ALREADY_EXISTS: {'info': '00002071: ../ldb_tdb/ldb_index.c:1339: Failed to re-index objectSid in CN=igpd9uyfit,CN=schueler,CN=users,OU=atzaici,DC=autotest201,DC=local - ../ldb_tdb/ldb_index.c:1259: unique index violation on objectSid in CN=igpd9uyfit,CN=schueler,CN=users,OU=atzaici,DC=autotest201,DC=local', 'desc': 'Already exists'}

Bug 41864 might be related as well?
Comment 7 Daniel Tröder univentionstaff 2019-03-11 13:41:55 CET
Still flaky in both 4.3 and 4.4.
Comment 8 Jan-Luca Kiok univentionstaff 2023-10-26 12:28:09 CEST
Bugzilla is not used anymore to track test failures.