Bug 47967 - School object creation fails in Jenkins
School object creation fails in Jenkins
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 4.3
Other Linux
: P5 normal (vote)
: UCS@school 4.3 v6
Assigned To: Daniel Tröder
Jürn Brodersen
https://forge.univention.org/bugzilla...
:
Depends on: 46765
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-12 12:28 CEST by Daniel Tröder
Modified: 2018-11-16 11:48 CET (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.051
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 2018-10-12 12:28:14 CEST
http://jenkins.knut.univention.de:8080/job/UCSschool-4.3/job/Install%20Singleserver/lastBuild/Config=s4,TestGroup=import4/testReport/junit/90_ucsschool/30_import-create_ou_via_cli/test/

(2018-10-11 23:36:23.879765) Traceback (most recent call last):
(2018-10-11 23:36:23.879791)   File "/usr/share/ucs-school-import/scripts/create_ou", line 147, in <module>
(2018-10-11 23:36:23.879837)     main()
(2018-10-11 23:36:23.879862)   File "/usr/share/ucs-school-import/scripts/create_ou", line 137, in main
(2018-10-11 23:36:23.879952)     create_ou(ou_name, display_name, edu_name, admin_name, share_name, lo, baseDN, hostname, is_single_master)
(2018-10-11 23:36:23.879992)   File "/usr/share/ucs-school-import/scripts/create_ou", line 73, in create_ou
(2018-10-11 23:36:23.880011)     new_school.create(lo)
(2018-10-11 23:36:23.880030)   File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 458, in create
(2018-10-11 23:36:23.880080)     success = self.create_without_hooks(lo, validate)
(2018-10-11 23:36:23.880110)   File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/school.py", line 390, in create_without_hooks
(2018-10-11 23:36:23.880137)     ou.create(lo, False)
(2018-10-11 23:36:23.880156)   File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/misc.py", line 64, in create
(2018-10-11 23:36:23.880200)     self.do_create(udm_obj, lo)
(2018-10-11 23:36:23.880222)   File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 505, in do_create
(2018-10-11 23:36:23.880239)     self._alter_udm_obj(udm_obj)
(2018-10-11 23:36:23.880258)   File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 447, in _alter_udm_obj
(2018-10-11 23:36:23.880310)     udm_obj[attr.udm_name] = value
(2018-10-11 23:36:23.880379)   File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 377, in __setitem__
(2018-10-11 23:36:23.880431)     self.descriptions[key]
(2018-10-11 23:36:23.880459) KeyError: 'ucsschoolRole'
Comment 1 Daniel Tröder univentionstaff 2018-10-12 12:36:43 CEST
[4.3] a12dbac70 Bug #47967: 'OU' is a non-school OU, don't add a role (revert code from #45379)
[4.3] b6a3bc571 Bug #45379: prevent writing of role attribute when deactivated
[4.3] 4f7ef02af Bug #45379: advisory

The last two commits have a wrong bug number in the commit message.
Comment 2 Daniel Tröder univentionstaff 2018-10-15 09:57:20 CEST
The commits from comment1 fixed the KeyError, but now a new error occurs:

Creating computers/domaincontroller_slave object with /usr/sbin/udm-test computers/domaincontroller_slave create --set name=m1jb2ld7aq
. ******************************************************
**** create_and_verify_ou test run
****	ou=szc4rapzkg
****	ou_displayname='\xc3\xbcJOF \xc3\xa4MPvz#\xc3\xa4\xc3\x9fAY.j,9o\xc3\xbcOUXW>, \xc3\x9f8pyY \xc3\xa4'
****	dc=None
****	dc_administrative=None
****	sharefileserver=m1jb2ld7aq
****	singlemaster=True
****	noneducational_create_objects=True
****	district_enable=True
****	default_dcs=None
****	dhcp_dns_clearou=True
******************************************************
Setting ucsschool/singlemaster
Setting ucsschool/ldap/noneducational/create/objects
Setting ucsschool/ldap/district/enable
Setting ucsschool/ldap/default/dcs
Setting ucsschool/import/generate/policy/dhcp/dns/clearou
Unsetting dhcpd/ldap/base
cmd_block: ['/usr/share/ucs-school-import/scripts/create_ou', 'szc4rapzkg', '--displayName=\xc3\xbcJOF \xc3\xa4MPvz#\xc3\xa4\xc3\x9fAY.j,9o\xc3\xbcOUXW>, \xc3\x9f8pyY \xc3\xa4', '--sharefileserver=m1jb2ld7aq']
The following fields reported errors during validation:
class_share_file_server: ['Not a valid LDAP DN']
home_share_file_server: ['Not a valid LDAP DN']

Skip OU and proceed with next one.

*** Purging OU 'szc4rapzkg' and related objects
*** Purging OU szc4rapzkg and related objects (ou=szc4rapzkg,ou=sz,dc=autotest201,dc=local): done
Comment 3 Daniel Tröder univentionstaff 2018-11-12 11:47:10 CET
The problem has been taken care of in comment1.
comment2 is duplicate of Bug #46765.
Comment 4 Jürn Brodersen univentionstaff 2018-11-14 09:56:11 CET
Works again
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2018-11-16 11:48:13 CET
UCS@school 4.3 v6 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.3v6-de.html

If this error occurs again, please clone this bug.