Bug 26367 - Typo in einer Fehlerbehandlung bei unbekannten Objekten
Typo in einer Fehlerbehandlung bei unbekannten Objekten
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.0-1-errata
Assigned To: UMC maintainers
:
: 26076 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-06 09:22 CET by Andreas Büsching
Modified: 2012-11-09 16:18 CET (History)
3 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:


Attachments
fix typo in error handling (463 bytes, patch)
2012-03-06 09:22 CET, Andreas Büsching
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Büsching univentionstaff 2012-03-06 09:22:50 CET
Created attachment 4254 [details]
fix typo in error handling

Wenn beim Auflisten von LDAP-Objekten eins gefunden wird, dass keinem UDM-Modul
zugeordnet werden kann gibt es momentan einen Traceback, da ein Typo in der
Fehlerbehandlung ist.


  File '/usr/lib/pymodules/python2.6/notifier/threads.py', line 81, in _run 
    tmp = self._function() 
  File '/usr/lib/pymodules/python2.6/notifier/__init__.py', line 104, in
__call__ 
    return self._function( *tmp, **self._kwargs ) 
  File
'/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__in
it__.py', line 842, in _thread 
    for module, obj in list_objects( container, object_type = object_type ):

  File
'/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_
ldap.py', line 130, in wrapper_func 
    ret = func( *args, **kwargs ) 
  File
'/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_
ldap.py', line 889, in list_objects 
    objects.append( ( module, module.get( dn ) ) ) 
  File
'/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_
ldap.py', line 130, in wrapper_func 
    ret = func( *args, **kwargs ) 
  File
'/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_
ldap.py', line 418, in get 
    raise UDM_Error( str( e ) ) 

UDM_Error: 'NoneType' object has no attribute 'object' 


Der angehängte Patch verhindert den Traceback (untested). Im Log sollte dann
eine Meldung wie folgt zu finden sein wenn der Container ausgewählt wird:

The UDM module %s could not be found. Ignoring LDAP object %s
Comment 1 Stefan Gohmann univentionstaff 2012-03-07 08:51:27 CET
Das gleiche oder zumindest ein ähnliches Problem tritt auf demo.univention.de auf, wenn man im Mail Modul sucht:

  File '/usr/lib/pymodules/python2.6/notifier/threads.py', line 81, in _run
    tmp = self._function()
  File '/usr/lib/pymodules/python2.6/notifier/__init__.py', line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py', line 416, in _thread
    result = module.search( request.options.get( 'container' ), request.options[ 'objectProperty' ], request.options[ 'objectPropertyValue' ], superordinate, scope = request.options.get( 'scope', 'sub' ) )
  File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py', line 130, in wrapper_func
    ret = func( *args, **kwargs )
  File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py', line 394, in search
    return self.module.lookup( None, ldap_connection, filter_s, base = container, superordinate = superordinate, scope = scope )

AttributeError: 'NoneType' object has no attribute 'lookup'

Wir sollten diese beiden Tracebacks im errata-Update beheben. Können wir das errata Update problemlos veröffentlichen? Differenz 3.0-0 / 3.0-1?
Comment 2 Andreas Büsching univentionstaff 2012-03-08 10:54:21 CET
(In reply to comment #1)
> Das gleiche oder zumindest ein ähnliches Problem tritt auf demo.univention.de
> auf, wenn man im Mail Modul sucht:

Das Problem hat einen anderen Ursprung und scheint nur demo.univention.de zu betreffen. Ich habe das in einen separaten Bug ausgelagert.

> Wir sollten diese beiden Tracebacks im errata-Update beheben. Können wir das
> errata Update problemlos veröffentlichen? Differenz 3.0-0 / 3.0-1?

Ich habe mir kurz die Änderungen zwischen der Version 1.0.265-1 und 1.0.273-1 angeschaut und würde denken, dass es funktionieren müsste. Die Grundfunktionaliät sollte bei der QA aber nochmal getestet werden.
Comment 3 Alexander Kläser univentionstaff 2012-03-09 13:54:54 CET
Ich erhalte noch folgenden Traceback dem computers/computer-Flavor:

====================
  File '/usr/lib/pymodules/python2.6/notifier/threads.py', line 81, in _run
    tmp = self._function()
  File '/usr/lib/pymodules/python2.6/notifier/__init__.py', line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py', line 431, in _thread
    'labelObjectType' : module.subtitle,
  File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py', line 433, in subtitle
    descr = getattr( self.module, 'short_description', self.module.module )

AttributeError: 'NoneType' object has no attribute 'module'
====================
Comment 4 Andreas Büsching univentionstaff 2012-03-09 14:07:07 CET
(In reply to comment #3)
> Ich erhalte noch folgenden Traceback dem computers/computer-Flavor:

Das ist das gleiche Problem, aber an einer anderen Stelle gewesen. Es wird im errata ebenfalls behoben
Comment 5 Alexander Kläser univentionstaff 2012-03-09 15:18:27 CET
In 3.0-1 wurde die JS-Funktion umc.tools.isEqual hinzugefügt, auf die nun im UDM-JS-Code verwiesen wird. Sie sollte mit in dem Modul übernommen werden, da derzeit bei einem Errata-Update unter 3.0-0 editierte UDM-Objekte nicht mehr gespeichert werden können.
Comment 6 Alexander Kläser univentionstaff 2012-03-12 16:24:15 CET
QA: Soweit sind alle Tests durch.
Comment 7 Alexander Kläser univentionstaff 2012-03-30 12:03:33 CEST
*** Bug 26076 has been marked as a duplicate of this bug. ***
Comment 8 Janek Walkenhorst univentionstaff 2012-11-09 16:18:55 CET
http://errata.univention.de/errata37.html