Bug 44310 - 207_import-users_school_change: User still has groups from OU
207_import-users_school_change: User still has groups from OU
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: ucs-test
UCS@school 4.2
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v2-errata
Assigned To: Daniel Tröder
Sönke Schwardt-Krummrich
:
Depends on: 33466 44351 46470 47332
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-06 17:28 CEST by Sönke Schwardt-Krummrich
Modified: 2023-06-12 15:39 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.171
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 Sönke Schwardt-Krummrich univentionstaff 2017-04-06 17:28:28 CEST
http://jenkins.knut.univention.de:8080/job/UCSschool%204.2/job/UCSschool%204.2%20Singleserver/ImportTests=ImportTests,SambaVersion=s4/27/testReport/junit/90_ucsschool/207_import-users_school_change/test/

[2017-04-05 22:10:28.791947] ===============================================================================
[2017-04-05 22:10:28.791958]   File "207_import-users_school_change", line 197, in <module>
[2017-04-05 22:10:28.791967]     main()
[2017-04-05 22:10:28.791976]   File "207_import-users_school_change", line 191, in main
[2017-04-05 22:10:28.791984]     tester.run()
[2017-04-05 22:10:28.791994]   File "/usr/share/ucs-test/90_ucsschool/essential/importusers_cli_v2.py", line 356, in run
[2017-04-05 22:10:28.792002]     self.test()
[2017-04-05 22:10:28.792010]   File "207_import-users_school_change", line 79, in test
[2017-04-05 22:10:28.792019]     self.verify_removed_schoolgroup_membership(person, self.ou_A.name)
[2017-04-05 22:10:28.792028]   File "207_import-users_school_change", line 170, in verify_removed_schoolgroup_membership
[2017-04-05 22:10:28.792037]     self.fail('User still has groups from OU %r: %r' % (school_removed_from, groups))
[2017-04-05 22:10:28.792046]   File "/usr/share/ucs-test/90_ucsschool/essential/importusers_cli_v2.py", line 338, in fail
[2017-04-05 22:10:28.792056]     self.log.error('\n%s\n%s%s', '=' * 79, ''.join(traceback.format_stack()), '=' * 79)
[2017-04-05 22:10:28.792065] ===============================================================================
[2017-04-05 22:10:28.792193] 2017-04-05 22:10:28 INFO: info:418: Installed package versions:
[2017-04-05 22:10:28.792396] 2017-04-05 22:10:28 INFO: info:418: ucs-test-ucsschool   4.0.4-5A~4.2.0.201704041507
[2017-04-05 22:10:28.792543] 2017-04-05 22:10:28 INFO: info:418: python-ucs-school    10.0.1-3A~4.2.0.201703141126
[2017-04-05 22:10:28.792686] 2017-04-05 22:10:28 INFO: info:418: ucs-school-import    15.0.0-2A~4.2.0.201703101008
[2017-04-05 22:10:28.792775] ### FAIL ###
[2017-04-05 22:10:28.792824] User still has groups from OU 'cgai5e2q7bi': ['cn=schueler-cgai5e2q7bi,cn=groups,ou=cgai5e2q7bi,dc=autotest201,dc=local', 'cn=schueler-4k7n03,cn=groups,ou=4k7n03,dc=autotest201,dc=local', 'cn=Domain Users 4k7n03,cn=groups,ou=4k7n03,dc=autotest201,dc=local']
[2017-04-05 22:10:28.792863] ###      ###

Please have a look, what the reason for this error message is.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2017-04-09 23:17:54 CEST
JFYI: fails also in UCS@school 4.1 R2 with a similar error message:

http://jenkins.knut.univention.de:8080/job/UCSschool%204.1/job/UCSschool%204.1%20(R2)%20Singleserver/lastCompletedBuild/ImportTests=ImportTests,SambaVersion=s4/testReport/90_ucsschool/207_import-users_school_change/test/

[2017-04-08 19:39:37.074315] 2017-04-08 19:39:37 ERROR: error:412: 
[2017-04-08 19:39:37.074347] ===============================================================================
[2017-04-08 19:39:37.074358]   File "207_import-users_school_change", line 197, in <module>
[2017-04-08 19:39:37.074366]     main()
[2017-04-08 19:39:37.074375]   File "207_import-users_school_change", line 191, in main
[2017-04-08 19:39:37.074382]     tester.run()
[2017-04-08 19:39:37.074393]   File "/usr/share/ucs-test/90_ucsschool/essential/importusers_cli_v2.py", line 356, in run
[2017-04-08 19:39:37.074402]     self.test()
[2017-04-08 19:39:37.074411]   File "207_import-users_school_change", line 79, in test
[2017-04-08 19:39:37.074419]     self.verify_removed_schoolgroup_membership(person, self.ou_A.name)
[2017-04-08 19:39:37.074428]   File "207_import-users_school_change", line 170, in verify_removed_schoolgroup_membership
[2017-04-08 19:39:37.074439]     self.fail('User still has groups from OU %r: %r' % (school_removed_from, groups))
[2017-04-08 19:39:37.074448]   File "/usr/share/ucs-test/90_ucsschool/essential/importusers_cli_v2.py", line 338, in fail
[2017-04-08 19:39:37.074458]     self.log.error('\n%s\n%s%s', '=' * 79, ''.join(traceback.format_stack()), '=' * 79)
[2017-04-08 19:39:37.074467] ===============================================================================
[2017-04-08 19:39:37.074598] 2017-04-08 19:39:37 INFO: info:418: Installed package versions:
[2017-04-08 19:39:37.074787] 2017-04-08 19:39:37 INFO: info:418: ucs-test-ucsschool   3.0.17-60.380.201703131328
[2017-04-08 19:39:37.074920] 2017-04-08 19:39:37 INFO: info:418: python-ucs-school    9.0.31-1.275.201702151147
[2017-04-08 19:39:37.075049] 2017-04-08 19:39:37 INFO: info:418: ucs-school-import    14.0.16-42.333.201702081756
[2017-04-08 19:39:37.075134] ### FAIL ###
[2017-04-08 19:39:37.075179] User still has groups from OU 'os7y93n11t': ['cn=mitarbeiter-os7y93n11t,cn=groups,ou=os7y93n11t,dc=autotest201,dc=local', 'cn=mitarbeiter-9osl,cn=groups,ou=9osl,dc=autotest201,dc=local', 'cn=Domain Users 9osl,cn=groups,ou=9osl,dc=autotest201,dc=local']
[2017-04-08 19:39:37.075217] ###      ###
Comment 2 Daniel Tröder univentionstaff 2017-04-18 16:10:12 CEST
Fixed by fixing Bug #44351.
Comment 3 Daniel Tröder univentionstaff 2017-04-19 09:48:59 CEST
No - failed again on 4.2 Singleserver ImportTests,s4.

The still-existing group is not a workgroup:

### FAIL ###
User still has groups from OU '9lk06uquo': ['cn=schueler-9lk06uquo,cn=groups,ou=9lk06uquo,dc=autotest201,dc=local', 'cn=schueler-lffz991v,cn=groups,ou=lffz991v,dc=autotest201,dc=local', 'cn=Domain Users lffz991v,cn=groups,ou=lffz991v,dc=autotest201,dc=local']
###      ###


But the error is obviously a s4-sync problem. The group had been removed at 19:11:58, but was suddenly back at 19:12:03:


2017-04-17 19:11:58 INFO: info:418: Membership: [ 'cn=schueler-lffz991v,cn=groups,ou=lffz991v,dc=autotest201,dc=local',
  'cn=Domain Users lffz991v,cn=groups,ou=lffz991v,dc=autotest201,dc=local']
verify person: ylqu4d73lt
Waiting for replication...
. . . . Done: replication complete.
get_samba_home_path_server: Singlemaster
** Entering verify_ldap_object
** Exiting verify_ldap_object
** Entering verify_ldap_object
** Exiting verify_ldap_object
** Entering verify_ldap_object
** Exiting verify_ldap_object
person OK: ylqu4d73lt
2017-04-17 19:12:03 ERROR: error:412: 
===============================================================================
  File "207_import-users_school_change", line 197, in <module>
    main()
  File "207_import-users_school_change", line 191, in main
    tester.run()
  File "/usr/share/ucs-test/90_ucsschool/essential/importusers_cli_v2.py", line 356, in run
    self.test()
  File "207_import-users_school_change", line 79, in test
    self.verify_removed_schoolgroup_membership(person, self.ou_A.name)
  File "207_import-users_school_change", line 170, in verify_removed_schoolgroup_membership
    self.fail('User still has groups from OU %r: %r' % (school_removed_from, groups))
  File "/usr/share/ucs-test/90_ucsschool/essential/importusers_cli_v2.py", line 338, in fail
    self.log.error('\n%s\n%s%s', '=' * 79, ''.join(traceback.format_stack()), '=' * 79)
===============================================================================
2017-04-17 19:12:03 INFO: info:418: Installed package versions:
2017-04-17 19:12:03 INFO: info:418: ucs-test-ucsschool   4.0.4-13A~4.2.0.201704102132
2017-04-17 19:12:03 INFO: info:418: python-ucs-school    10.0.1-3A~4.2.0.201703141126
2017-04-17 19:12:03 INFO: info:418: ucs-school-import    15.0.0-3A~4.2.0.201704062149
### FAIL ###
User still has groups from OU '9lk06uquo': ['cn=schueler-9lk06uquo,cn=groups,ou=9lk06uquo,dc=autotest201,dc=local', 'cn=schueler-lffz991v,cn=groups,ou=lffz991v,dc=autotest201,dc=local', 'cn=Domain Users lffz991v,cn=groups,ou=lffz991v,dc=autotest201,dc=local']
###      ###


I will investigate if a more reliable way to wait for the s4 connector exists.
Comment 4 Daniel Tröder univentionstaff 2017-05-02 16:01:56 CEST
r79008: added code to search and wait for s4 to sync group members
Comment 5 Daniel Tröder univentionstaff 2017-06-15 18:27:31 CEST
The problem with the users not leaving - or getting readded to - the groups may be related to Bug #33466.
Comment 6 Jürn Brodersen univentionstaff 2018-07-09 13:10:41 CEST
(In reply to Daniel Tröder from comment #5)
> The problem with the users not leaving - or getting readded to - the groups
> may be related to Bug #33466.

bug 46470 seems to be the current bug for this.

Also wait_for_drs_replication returns None instead of failing in case a timeout appeared. I think we should change that to catch s4 connector problems better.
Comment 7 Daniel Tröder univentionstaff 2019-06-13 09:48:12 CEST
ucs-test-ucsschool/90_ucsschool/207_import-users_school_change has been stable for a while now in both 4.3 and 4.4.
(Probably due to changes to the DRS replication waiting code.)