Univention Bugzilla – Bug 26080
Traceback "UnboundLocalError" bei Benutzerobjekten
Last modified: 2013-02-25 12:23:36 CET
Aufgefallen im Rahmen von 2012011121004224: Bei scheinbar allen Benutzerobjekten tritt dieser Traceback beim öffnen von Benutzern über die UMC auf: Interner Modul-Fehler: Ein Fehler trat während des Ausführens des Befehls auf. Fehlernachricht des Servers: 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 754, in _thread return read_syntax_choices( request.options[ 'syntax' ], request.options ) 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 1037, in read_syntax_choices syntax.choices.append( { 'module' : 'udm', 'flavor' : module.flavor, 'objectType' : module.name, 'id' : id, 'label' : label, 'icon' : 'udm-%s' % module.name.replace( '/', '-' ) } ) UnboundLocalError: local variable 'id' referenced before assignment
Da scheint es ein Problem mit einer LDAP Search Syntax Definition zu geben. Bitte mal die LDAP Search Syntax Objekte anhängen: univention-ldapsearch -x objectClass=univentionSyntax
Hier die Extended Attributes mit "neutralisierter" LDAP-Basis. In der Vorbereitung waren die TCS-Attribute noch nicht eingespielt, dort trat das Problem nicht auf. dn: cn=z4uUserSendAsPrivilege,cn=zarafa,cn=custom attributes,cn=univention,dc=base,dc=de univentionSyntaxLDAPFilter: (zarafaAccount=1) univentionSyntaxLDAPAttribute: user/user: username univentionSyntaxViewOnly: FALSE univentionSyntaxDescription: Zarafa User for SendAsPrivilege cn: z4uUserSendAsPrivilege univentionSyntaxLDAPValue: uidNumber objectClass: top objectClass: univentionSyntax objectClass: univentionObject univentionObjectType: settings/syntax dn: cn=thinClientAutostart,cn=Thin Client,cn=custom attributes,cn=univention,dc=base,dc=de univentionSyntaxLDAPFilter: objectClass=univentionThinClientAutostart univentionSyntaxLDAPAttribute: univentionThinClientAutostartName univentionSyntaxViewOnly: FALSE univentionSyntaxLDAPValue: univentionThinClientAutostartCommand cn: thinClientAutostart objectClass: top objectClass: univentionSyntax objectClass: univentionObject univentionObjectType: settings/syntax dn: cn=thinClientSession,cn=Thin Client,cn=custom attributes,cn=univention,dc=base,dc=de univentionSyntaxLDAPFilter: objectClass=univentionThinClientSession univentionSyntaxLDAPAttribute: univentionThinClientSessionName univentionSyntaxViewOnly: FALSE univentionSyntaxLDAPValue: univentionThinClientSessionScript cn: thinClientSession objectClass: top objectClass: univentionSyntax objectClass: univentionObject univentionObjectType: settings/syntax dn: cn=ManagementServer,cn=UVMM,cn=custom attributes,cn=univention,dc=base,dc=de univentionSyntaxLDAPFilter: univentionService=Virtual Machine Manager objectClass: top objectClass: univentionSyntax objectClass: univentionObject univentionObjectType: settings/syntax univentionSyntaxLDAPAttribute: computers/computer: fqdn univentionSyntaxViewOnly: FALSE univentionSyntaxLDAPValue: computers/computer: fqdn cn: ManagementServer search: 3 result: 0 Success
(In reply to comment #2) > Hier die Extended Attributes mit "neutralisierter" LDAP-Basis. In der > Vorbereitung waren die TCS-Attribute noch nicht eingespielt, dort trat das > Problem nicht auf. Kannst du auch noch die Extended Attributes der Benutzer anhängen?
Schuld ist z4uUserSendAsPrivilege: Die Suche nach (zarafaAccount=1) kann auch Gruppen als Ergebnis liefern, die Gruppen haben dann das geforderte Attribut UIDNumber nicht. Workaround: Ändern des Filter auf (&(zarafaAccount=1)(uidNumber=*)): dn: cn=SendAsPrivilege,cn=zarafa,cn=custom attributes,cn=univention,dc=base,dc=de univentionUDMPropertyValueMayChange: 1 cn: SendAsPrivilege univentionUDMPropertyShortDescription: Send as privilege univentionUDMPropertyModule: users/user univentionUDMPropertyLayoutTabName: Zarafa univentionUDMPropertySyntax: z4uUserSendAsPrivilege univentionUDMPropertyLongDescription: Users may directly send email as this us er univentionUDMPropertyVersion: 2 univentionUDMPropertyMultivalue: 1 univentionUDMPropertyObjectClass: zarafa-user univentionUDMPropertyCLIName: SendAsPrivilege univentionUDMPropertyLayoutPosition: 3 univentionUDMPropertyValueNotEditable: 0 univentionUDMPropertyLdapMapping: zarafaSendAsPrivilege objectClass: top objectClass: univentionUDMProperty objectClass: univentionObject univentionObjectType: settings/extended_attribute
Als Lösung würde ich jetzt denken, dass Objekte, die nicht den "Anforderungen" entsprechend ignoriert werden und im Log (ERROR oder WARN) vermerkt werden.
Created attachment 4528 [details] Skript zum Erstellen von Extended-Attributes Das angehängte Skript provoziert diesen Fehler, wenn man im UMC einen Benutzer anzeigt. Der Traceback wird jetzt verhindert, die entsprechenden Objekt ignoriert und mit einer Fehlermeldung im Log-File quittiert. univention-management-console-module-udm (1.0.285-1) unstable; urgency=low . * LDAP objects that do not have the attributes specified by LDAP search syntaxes are ignored and acknowledged with an warning in the log files; Bug #26080
(In reply to comment #6) > Created an attachment (id=4528) [details] > Skript zum Erstellen von Extended-Attributes > > Das angehängte Skript provoziert diesen Fehler, wenn man im UMC einen Benutzer > anzeigt. Der Traceback wird jetzt verhindert, die entsprechenden Objekt > ignoriert und mit einer Fehlermeldung im Log-File quittiert. Ja, Verhalten nachgestellt. Traceback erscheint nicht mehr, im Log ist ein Warning. Changelog vorhanden.
UCS 3.0-2 has been released: http://forum.univention.de/viewtopic.php?f=54&t=1905 If this error occurs again, please use "Clone This Bug".