Univention Bugzilla – Bug 41914
Class groups of "secondary schools" are created in wrong container
Last modified: 2016-11-10 16:03:17 CET
The following user in member in school 'f6xbe73h03p' and 'to4o'. "Primary" school is 'f6xbe73h03p'. If classes are specified for both schools, the school class objects of the "secondary" school 'to4o' are created in wrong container and only as "Group" instead of "SchoolGroup". → 'school_classes': {'to4o': ['to4o-5i', 'to4o-7k'], 'f6xbe73h03p': ['f6xbe73h03p-0l']} → wrong: Creating Group(name='to4o-7k', school='f6xbe73h03p', dn='cn=to4o-7k,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') → should be SchoolClass(name='to4o-7k', school='f6xbe73h03p', dn='cn=to4o-7k,cn=klassen,cn=schueler,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') → wrong: Creating Group(name='to4o-5i', school='f6xbe73h03p', dn='cn=to4o-5i,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') → should be: Group(name='to4o-5i', school='f6xbe73h03p', dn='cn=to4o-5i,cn=klassen,cn=schueler,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') → correct: Creating SchoolClass(name='f6xbe73h03p-0l', school='f6xbe73h03p', dn='cn=f6xbe73h03p-0l,cn=klassen,cn=schueler,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') 2016-07-27 17:36:06 DEBUG base.get_only_udm_obj:853 Getting ImportStudent UDM object by filter: (&(objectClass=ucsschoolType)(ucsschoolSourceUID=sourceUID-4yv367trv3)(ucsschoolRecordUID=vqbyho57gb;be5l2sweyg;jrjis1uj6s@nstx.local)) 2016-07-27 17:36:06 INFO user_import.create_and_modify_users:128 Adding ImportStudent(name='v.be5l2sweyg', school='f6xbe73h03p', dn='uid=v.be5l2sweyg,cn=schueler,cn=users,ou=f6xbe73h03p,dc=nstx,dc=local', old_dn=None) (source_uid:sourceUID-4yv367trv3 record_uid:vqbyho57gb;be5l2sweyg;jrjis1uj6s@nstx.local) attributes={'$dn$': 'uid=v.be5l2sweyg,cn=schueler,cn=users,ou=f6xbe73h03p,dc=nstx,dc=local', 'display_name': 'vqbyho57gb be5l2sweyg', 'record_uid': u'vqbyho57gb;be5l2sweyg;jrjis1uj6s@nstx.local', 'firstname': 'vqbyho57gb', 'lastname': 'be5l2sweyg', 'type_name': 'Student', 'school': 'f6xbe73h03p', 'name': 'v.be5l2sweyg', 'disabled': 'none', 'email': u'jrjis1uj6s@nstx.local', 'birthday': None, 'type': 'importStudent', 'schools': ['f6xbe73h03p', 'to4o'], 'password': 'xxxxxxxxxx', 'source_uid': u'sourceUID-4yv367trv3', 'school_classes': {'to4o': ['to4o-5i', 'to4o-7k'], 'f6xbe73h03p': ['f6xbe73h03p-0l']}, 'objectType': 'users/user'} udm_properties={'overridePWHistory': '1', u'description': u'', 'overridePWLength': '1'}... 2016-07-27 17:36:06 DEBUG base.call_hooks:363 /usr/share/ucs-school-import/hooks/user_create_pre.d not found or empty. 2016-07-27 17:36:06 DEBUG base.get_only_udm_obj:853 Getting ImportStudent UDM object by filter: username=v.be5l2sweyg 2016-07-27 17:36:06 INFO base.create_without_hooks:425 Creating ImportStudent(name='v.be5l2sweyg', school='f6xbe73h03p', dn='uid=v.be5l2sweyg,cn=schueler,cn=users,ou=f6xbe73h03p,dc=nstx,dc=local', old_dn=None) 2016-07-27 17:36:06 DEBUG base.cache:209 Initializing ('School', ('name', 'f6xbe73h03p')) 2016-07-27 17:36:06 DEBUG base.get_udm_object:650 Getting School UDM object by dn: ou=f6xbe73h03p,dc=nstx,dc=local 2016-07-27 17:36:06 DEBUG base.get_only_udm_obj:853 Getting ImportStudent UDM object by filter: &(!(uid=v.be5l2sweyg))(mailPrimaryAddress=jrjis1uj6s@nstx.local) 2016-07-27 17:36:06 DEBUG base.cache:209 Initializing ('MailDomain', ('name', u'nstx.local')) 2016-07-27 17:36:06 DEBUG base.get_udm_object:650 Getting MailDomain UDM object by dn: cn=nstx.local,cn=domain,cn=mail,dc=nstx,dc=local 2016-07-27 17:36:06 DEBUG base.cache:209 Initializing ('Group', ('name', 'Domain Users f6xbe73h03p'), ('school', 'f6xbe73h03p')) 2016-07-27 17:36:06 DEBUG base.call_hooks:363 /usr/share/ucs-school-import/hooks/group_create_pre.d not found or empty. 2016-07-27 17:36:06 DEBUG base.get_only_udm_obj:853 Getting Group UDM object by filter: name=Domain Users f6xbe73h03p 2016-07-27 17:36:06 DEBUG base.cache:209 Initializing ('Group', ('name', 'schueler-f6xbe73h03p'), ('school', 'f6xbe73h03p')) 2016-07-27 17:36:06 DEBUG base.cache:209 Initializing ('Group', ('name', 'to4o-5i'), ('school', 'f6xbe73h03p')) 2016-07-27 17:36:06 DEBUG base.get_only_udm_obj:853 Getting Group UDM object by filter: name=to4o-5i 2016-07-27 17:36:06 INFO base.create_without_hooks:425 Creating Group(name='to4o-5i', school='f6xbe73h03p', dn='cn=to4o-5i,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') 2016-07-27 17:36:07 INFO base.create_without_hooks:447 Group(name='to4o-5i', school='f6xbe73h03p', dn='cn=to4o-5i,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') successfully created 2016-07-27 17:36:07 DEBUG base.invalidate_cache:230 Invalidating ('Group', ('name', 'Domain Users f6xbe73h03p'), ('school', 'f6xbe73h03p')) 2016-07-27 17:36:07 DEBUG base.invalidate_cache:230 Invalidating ('Group', ('name', 'to4o-5i'), ('school', 'f6xbe73h03p')) 2016-07-27 17:36:07 DEBUG base.invalidate_cache:230 Invalidating ('Group', ('name', 'schueler-f6xbe73h03p'), ('school', 'f6xbe73h03p')) 2016-07-27 17:36:07 DEBUG base.call_hooks:363 /usr/share/ucs-school-import/hooks/group_create_post.d not found or empty. 2016-07-27 17:36:07 DEBUG base.cache:209 Initializing ('Group', ('name', 'to4o-7k'), ('school', 'f6xbe73h03p')) 2016-07-27 17:36:07 DEBUG base.get_only_udm_obj:853 Getting Group UDM object by filter: name=to4o-7k 2016-07-27 17:36:07 INFO base.create_without_hooks:425 Creating Group(name='to4o-7k', school='f6xbe73h03p', dn='cn=to4o-7k,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') 2016-07-27 17:36:07 INFO base.create_without_hooks:447 Group(name='to4o-7k', school='f6xbe73h03p', dn='cn=to4o-7k,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') successfully created 2016-07-27 17:36:07 DEBUG base.invalidate_cache:230 Invalidating ('Group', ('name', 'to4o-7k'), ('school', 'f6xbe73h03p')) 2016-07-27 17:36:07 DEBUG base.get_only_udm_obj:853 Getting SchoolClass UDM object by filter: name=f6xbe73h03p-0l 2016-07-27 17:36:07 INFO base.create_without_hooks:425 Creating SchoolClass(name='f6xbe73h03p-0l', school='f6xbe73h03p', dn='cn=f6xbe73h03p-0l,cn=klassen,cn=schueler,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') 2016-07-27 17:36:07 INFO base.create_without_hooks:447 SchoolClass(name='f6xbe73h03p-0l', school='f6xbe73h03p', dn='cn=f6xbe73h03p-0l,cn=klassen,cn=schueler,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') successfully created 2016-07-27 17:36:07 DEBUG base.invalidate_cache:230 Invalidating ('SchoolClass', ('name', 'f6xbe73h03p-0l'), ('school', 'f6xbe73h03p')) 2016-07-27 17:36:07 DEBUG base.invalidate_cache:230 Invalidating ('SchoolClass', ('name', 'to4o-5i'), ('school', 'to4o')) 2016-07-27 17:36:07 DEBUG base.invalidate_cache:230 Invalidating ('SchoolClass', ('name', 'to4o-7k'), ('school', 'to4o')) 2016-07-27 17:36:07 DEBUG base.get_only_udm_obj:853 Getting SchoolClass UDM object by filter: name=f6xbe73h03p-0l 2016-07-27 17:36:07 DEBUG base.get_udm_object:650 Getting ClassShare UDM object by dn: cn=f6xbe73h03p-0l,cn=klassen,cn=shares,ou=f6xbe73h03p,dc=nstx,dc=local 2016-07-27 17:36:07 DEBUG base.call_hooks:363 /usr/share/ucs-school-import/hooks/share_create_pre.d not found or empty. 2016-07-27 17:36:07 INFO base.create_without_hooks:425 Creating ClassShare(name='f6xbe73h03p-0l', school='f6xbe73h03p', dn='cn=f6xbe73h03p-0l,cn=klassen,cn=shares,ou=f6xbe73h03p,dc=nstx,dc=local') 2016-07-27 17:36:07 DEBUG base.from_dn:836 Looking up School with dn 'ou=f6xbe73h03p,dc=nstx,dc=local' 2016-07-27 17:36:07 INFO share.do_create:66 Creating share on "dcf6xbe73h03p-01.nstx.local" 2016-07-27 17:36:07 INFO base.create_without_hooks:447 ClassShare(name='f6xbe73h03p-0l', school='f6xbe73h03p', dn='cn=f6xbe73h03p-0l,cn=klassen,cn=shares,ou=f6xbe73h03p,dc=nstx,dc=local') successfully created 2016-07-27 17:36:07 DEBUG base.call_hooks:363 /usr/share/ucs-school-import/hooks/share_create_post.d not found or empty. 2016-07-27 17:36:07 DEBUG base.cache:209 Initializing ('Group', ('name', 'schueler-f6xbe73h03p'), ('school', 'f6xbe73h03p')) 2016-07-27 17:36:07 DEBUG base.get_only_udm_obj:853 Getting Group UDM object by filter: name=schueler-f6xbe73h03p 2016-07-27 17:36:07 DEBUG base.from_dn:836 Looking up School with dn 'ou=f6xbe73h03p,dc=nstx,dc=local' 2016-07-27 17:36:07 DEBUG base.get_all:721 Getting all AnyComputer of f6xbe73h03p with filter 'univentionService=Windows Profile Server' 2016-07-27 17:36:07 WARNING utils.stopped_notifier:190 Starting univention-directory-notifier 2016-07-27 17:36:08 INFO utils._run:162 Starting Univention Directory Notifier daemon.
> → wrong: Creating Group(name='to4o-7k', school='f6xbe73h03p', > dn='cn=to4o-7k,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') > → should be SchoolClass(name='to4o-7k', school='f6xbe73h03p', dn='cn=to4o- > 7k,cn=klassen,cn=schueler,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') wrong, should be SchoolClass(name='to4o-7k', school='to4o', dn='cn=to4o-7k,cn=klassen,cn=schueler,cn=groups,ou=to4o,dc=nstx,dc=local') > → wrong: Creating Group(name='to4o-5i', school='f6xbe73h03p', dn='cn=to4o- > 5i,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') > → should be: Group(name='to4o-5i', school='f6xbe73h03p', dn='cn=to4o- > 5i,cn=klassen,cn=schueler,cn=groups,ou=f6xbe73h03p,dc=nstx,dc=local') wrong: should be SchoolClass(name='to4o-5i', school='to4o', dn='cn=to4o-5i,cn=klassen,cn=schueler,cn=groups,ou=to4o,dc=nstx,dc=local')
A comment with bugnumber has been added to ucs-test script 34_import-users_via_cli_v2 to trigger the bug.
afaics caused by svn r71418 / Bug #41907.
This is fixed in unreleased errate scope. Don't know by which bug.
@QA: Please change to DUPLICATE of Bug #41907 if this is correct.
OK: I have no idea how to reproduce, the test case ofc fails without the patch of Bug #41907. ucs-test-ucsschool (3.0.16-14): r72840 | Bug #41914: reenable correct test case behavior