Univention Bugzilla – Bug 30251
district mode
Last modified: 2013-07-22 11:25:03 CEST
UCS@school's district mode has to be tested intensively.
*** Bug 15078 has been marked as a duplicate of this bug. ***
The basic problem seems to be the following traceback, which occurs in nearly every UMC module. This bug needs to be fixed before any other module tests can be done: --- Execution of command 'distribution/groups' has failed: Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute func( request ) File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 218, in wrapper_func raise LDAP_ConnectionError( str( e ) ) LDAP_ConnectionError: No such object ---
to debug: ucr set ldap/debug/level=4 tail -f /var/log/syslog
Is there a quick solution for the OU detection possible? OUs may be detected via objectClass "ucsschoolOrganizationalUnit".
(In reply to comment #4) > Is there a quick solution for the OU detection possible? > OUs may be detected via objectClass "ucsschoolOrganizationalUnit". That should be a very good idea! I will have a look at it.
Created attachment 5226 [details] Patch to enable the district mode in UMC The attached patch should enable the usage of district mode in UMC. After applying the patch, I could log in as Administrator and teacher. The list of schools was displayed correctly, and the modules I tested were fine. Basically, I changed the type SearchBaseSchool.availableSchools to be a dict of OU-DN pairs instead a list of OUs. One little adjustment was necessary in the computer room module. Otherwise, I could not see any other part that would specifically work with the availableSchools property.
Note, I left the old handling of OUs as fallback in case the objectClass is not set correctly.
As discussed, I applied the patch, packages are building. ucs-school-umc-computerroom (3.0.1-0) unstable; urgency=low . * Bug #30251: adjustments to enable the district mode ucs-school-lib (3.0.1-0) unstable; urgency=low . * Bug #30251: adjustments to enable the district mode
Probably a side effect: > Traceback (most recent call last): > File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute > func( request ) > File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 195, in wrapper_func > _init_search_base( read_connection ) > File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 333, in _init_search_base > _search_base = SchoolSearchBase({}) > File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 351, in __init__ > self._school = school or availableSchools.keys()[0] > IndexError: list index out of range
(In reply to comment #9) > Probably a side effect: > ... Happened in multi server scenario, when trying to create the first OU with the wizard module on the master.
(In reply to comment #10) > (In reply to comment #9) > > Probably a side effect: > > ... > > Happened in multi server scenario, when trying to create the first OU with the > wizard module on the master. Fixed: ucs-school-lib (3.0.2-0) unstable; urgency=low . * Bug #30251: fixed traceback when no school OUs exist
Another one in the installer: > Traceback (most recent call last): > File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute > func( request ) > File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 176, in _response > return function(self, request) > File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolinstaller/__init__.py", line 569, in install > searchBase = SchoolSearchBase([schoolOU], ldapBase=ucrMaster.get('ldap/base')) > File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 353, in __init__ > self._school = availableSchools.keys()[0] > AttributeError: 'list' object has no attribute 'keys' fixed in: ucs-school-umc-installer (1.0.1-0) unstable; urgency=low . * Bug #30251: adjustments to enable the district mode
svn rev40636 breaks room selection for non-district mode. The change was: - for ischool in search_base.availableSchools: - if ('ou=%s' % ischool) in roomParts: + for ischool, ischoolDN in search_base.availableSchools.iteritems(): + if ischoolDN in roomParts: ( ERROR ) : Failed to find corresponding school OU for room "cn=fooschool-raum1,cn=raeume,cn=groups,ou=fooschool,dc=ucs,dc=school" in list of schools ({'fooschool': 'ou=fooschool,dc=ucs,dc=school'})
I think these changes produce too much side effects at the moment. Please revert all changes done for this bug and attach a patch for later integration.
Created attachment 5230 [details] district.patch (In reply to comment #14) > I think these changes produce too much side effects at the moment. Please > revert all changes done for this bug and attach a patch for later integration. Ok, the patch contains all made changes. It needs to be adapted at least for the computerroom module. Also a typo: s/, ):/ ):/ and the 'if len(foo)' can be replaced by 'if foo'
The changes have been reverted and the packages have been built.
(In reply to comment #13) > svn rev40636 breaks room selection for non-district mode. > > The change was: > - for ischool in search_base.availableSchools: > - if ('ou=%s' % ischool) in roomParts: > + for ischool, ischoolDN in > search_base.availableSchools.iteritems(): > + if ischoolDN in roomParts: > > ( ERROR ) : Failed to find corresponding school OU for room > "cn=fooschool-raum1,cn=raeume,cn=groups,ou=fooschool,dc=ucs,dc=school" in list > of schools ({'fooschool': 'ou=fooschool,dc=ucs,dc=school'}) → this should be then "if ischoolDN in roomDN:" instead of "... in roomParts:".
OK, all changes have been reverted.
UCS@school 3.1 R2 has been released: http://download.univention.de/doc/release-notes-ucsschool-3.1-rev2.pdf If this error occurs again, please use "Clone This Bug".