Bug 41753 - create_ou throws traceback
create_ou throws traceback
Status: CLOSED INVALID
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Florian Best
Daniel Tröder
: interim-1
Depends on:
Blocks: 40262
  Show dependency treegraph
 
Reported: 2016-07-07 22:18 CEST by Sönke Schwardt-Krummrich
Modified: 2016-11-10 16:03 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
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 Sönke Schwardt-Krummrich univentionstaff 2016-07-07 22:18:23 CEST
./create_ou schoolA dcslaveA
[...]
univention-directory-notifier started
Traceback (most recent call last):
  File "./create_ou", line 3223, in <module>
    verify_school_ou(ouname, co, lo, baseDN, dcName=dcNameEducational, ShareFileServer=options.ShareFileServer, displayName=options.displayName)
  File "./create_ou", line 619, in verify_school_ou
    r = lo.modify(ou_base, [('displayName', lo.get(ou_base, ['displayName']).get('displayName',[]), [displayName])])
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 427, in modify
    raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg)
univention.admin.uexceptions.ldapError: Object class violation: attribute 'displayName' not allowed
Comment 1 Florian Best univentionstaff 2016-07-08 12:02:53 CEST
When does this happen? I thought we fixed this already twice :D
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2016-07-08 12:55:44 CEST
(In reply to Florian Best from comment #1)
> When does this happen? I thought we fixed this already twice :D

On my test machine. Have to recheck, if latest version fixes the problem.
Comment 3 Florian Best univentionstaff 2016-07-18 19:36:30 CEST
This happens only if you have got an existing OU (which is not a ucsschool-OU) and you call create_ou() for this):

~# udm container/ou create --set name=asdf
Object created: ou=asdf,dc=school,dc=local
~# /usr/share/ucs-school-import/scripts/create_ou asdf
verify ou for school nr asdf
need to create group cn=OUasdf-DC-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=school,dc=local
creating object cn=OUasdf-DC-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=school,dc=local
need to create group cn=OUasdf-Member-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=school,dc=local
creating object cn=OUasdf-Member-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=school,dc=local
need to create group cn=OUasdf-DC-Edukativnetz,cn=ucsschool,cn=groups,dc=school,dc=local
creating object cn=OUasdf-DC-Edukativnetz,cn=ucsschool,cn=groups,dc=school,dc=local
need to create group cn=OUasdf-Member-Edukativnetz,cn=ucsschool,cn=groups,dc=school,dc=local
creating object cn=OUasdf-Member-Edukativnetz,cn=ucsschool,cn=groups,dc=school,dc=local
Traceback (most recent call last):
  File "/usr/share/ucs-school-import/scripts/create_ou", line 3193, in <module>
    verify_school_ou(ouname, co, lo, baseDN, dcName=dcNameEducational, ShareFileServer=options.ShareFileServer, displayName=options.displayName)
  File "/usr/share/ucs-school-import/scripts/create_ou", line 620, in verify_school_ou
    r = lo.modify(ou_base, [('displayName', lo.get(ou_base, ['displayName']).get('displayName',[]), [displayName])])
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 399, in modify
    raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg)
univention.admin.uexceptions.ldapError: Object class violation: attribute 'displayName' not allowed
Comment 4 Daniel Tröder univentionstaff 2016-07-20 10:01:36 CEST
# /usr/share/ucs-school-import/scripts/create_ou schule4 meinslave
→ OK

# udm container/ou create --set name=keineschule
# /usr/share/ucs-school-import/scripts/create_ou keineschule einslave
→ Traceback