Bug 34956 - Setting computer room: Traceback in new school
Setting computer room: Traceback in new school
Status: RESOLVED WORKSFORME
Product: UCS@school
Classification: Unclassified
Component: UMC - Computer room
UCS@school 3.2 R2
Other Linux
: P5 normal (vote)
: UCS@school 3.2.x
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-24 15:29 CEST by Dirk Wiesenthal
Modified: 2016-11-07 06:27 CET (History)
2 users (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:
best: Patch_Available+


Attachments
patch (937 bytes, patch)
2016-06-13 12:05 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2014-05-24 15:29:02 CEST
I added a second school to a slave. This school had no rooms yet. Opening the computer room module let me choose which room is want to open and shows both schools. However, when selecting the new one I get:

24.05.14 15:30:33.065  MODULE      ( PROCESS ) : Die Ausführung des Kommandos computerroom/rooms ist fehlgeschlagen:

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 204, in wrapper_func
    return func( *args, **kwargs )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/computerroom/__init__.py", line 333, in rooms
    for iroom in self._groups(ldap_user_read, search_base.school, search_base.rooms):
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 581, in _groups
    groupresult = udm_modules.lookup('groups/group', None, ldap_connection, scope = scope, base = ldap_base, filter = ldapFilter)
  File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 801, in lookup 
    tmpres=module.lookup(co, lo, filter, base=base, superordinate=superordinate, scope=scope, unique=unique, required=required, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/groups/group.py", line 1077, in lookup 
    for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit):
  File "/usr/lib/pymodules/python2.6/univention/admin/uldap.py", line 347, in search 
    raise univention.admin.uexceptions.noObject, _err2str(msg)
noObject: No such object 


I would have thought that this means, search_base.rooms does not exist. But cn=raeume,cn=groups,ou=oberschule,dc=krus,dc=ucsschool,dc=qa does!

After adding a first room, the traceback is gone. Interestingly, it is gone even after deleting this room again, leaving "oberschule" again with no rooms.
Comment 1 Dirk Wiesenthal univentionstaff 2014-05-24 15:30:18 CEST
I experienced this bug also when adding a new room to oberschule and searching for computers in the school.

Die Ausführung des Kommandos schoolrooms/computers ist fehlgeschlagen:

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 204, in wrapper_func
    return func( *args, **kwargs )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolrooms/__init__.py", line 63, in computers
    objs = udm_modules.lookup( 'computers/computer', None, ldap_user_read, scope = 'one', base = search_base.computers, filter = ldapFilter)
  File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 801, in lookup
    tmpres=module.lookup(co, lo, filter, base=base, superordinate=superordinate, scope=scope, unique=unique, required=required, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/computers/computer.py", line 175, in lookup
    res.extend( computer.lookup(co, lo, filter_s, base, superordinate, scope, unique, required, timeout, sizelimit) )
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/computers/linux.py", line 664, in lookup
    for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit):
  File "/usr/lib/pymodules/python2.6/univention/admin/uldap.py", line 347, in search
    raise univention.admin.uexceptions.noObject, _err2str(msg)
noObject: No such object
Comment 2 Florian Best univentionstaff 2016-06-13 12:05:12 CEST
Created attachment 7736 [details]
patch
Comment 3 Florian Best univentionstaff 2016-11-07 06:27:53 CET
I fixed this during UCS@school 4.1R2.