Bug 26304 - Traceback bei der Ausführung von univention-object-type-migrate
Traceback bei der Ausführung von univention-object-type-migrate
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.0-2
Assigned To: Alexander Kläser
Andreas Büsching
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-01 10:26 CET by Tobias Scherer
Modified: 2012-07-20 15:25 CEST (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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Scherer univentionstaff 2012-03-01 10:26:37 CET
Aufgefallen an Ticket#2012022221000376

/usr/share/univention-directory-manager-tools/univention-object-type-migrate -a -v
  
 Warning: No match for 
 'sambaSID=S-1-5-21-2139631211-2656284875-1790543244-11793,cn=idmap,cn=univention,<$domain>'

 Traceback (most recent call last):
    File 
 "/usr/share/univention-directory-manager-tools/univention-object-type-migrate", 
 line 115, in <module>
      if not main(options):
    File 
 "/usr/share/univention-directory-manager-tools/univention-object-type-migrate", 
 line 102, in main
      uldap.modify(dn, changes)
    File "/usr/lib/pymodules/python2.6/univention/uldap.py", line 484, in 
 modify
      self.lo.modify_s(dn, ml)
    File "/usr/lib/python2.6/dist-packages/ldap/ldapobject.py", line 322, 
 in modify_s
      return self.result(msgid,all=1,timeout=self.timeout)
    File "/usr/lib/python2.6/dist-packages/ldap/ldapobject.py", line 422, 
 in result
      res_type,res_data,res_msgid = self.result2(msgid,all,timeout)
    File "/usr/lib/python2.6/dist-packages/ldap/ldapobject.py", line 426, 
 in result2
      res_type, res_data, res_msgid, srv_ctrls = 
 self.result3(msgid,all,timeout)
    File "/usr/lib/python2.6/dist-packages/ldap/ldapobject.py", line 432, 
 in result3
      ldap_result = self._ldap_call(self._l.result3,msgid,all,timeout)
    File "/usr/lib/python2.6/dist-packages/ldap/ldapobject.py", line 96, 
 in _ldap_call
      result = func(*args,**kwargs)
 ldap.INVALID_SYNTAX: {'info': 'objectClass: value #14 invalid per 
 syntax', 'desc': 'Invalid syntax'}
Comment 1 Alexander Kläser univentionstaff 2012-03-29 15:19:42 CEST
Der Traceback kann wie folgt auf einem 3.0-System forciert werden:

* Auskommentieren der Schemaerweiterungen in /usr/share/univention-ldap/schema/univention-objecttype.schema
* Entfernen aller Attribute "objectClass: univentionObject"
* Ausführen des Befehls univention-object-type-migrate

D.h. der Fehler ist wahrscheinlich aufgetreten, als die Schemaerweiterungen noch nicht eingespielt waren.
Comment 2 Alexander Kläser univentionstaff 2012-03-29 15:39:39 CEST
(In reply to comment #1)
> Der Traceback kann wie folgt auf einem 3.0-System forciert werden:
> 
> * Auskommentieren der Schemaerweiterungen in
> /usr/share/univention-ldap/schema/univention-objecttype.schema
> * Entfernen aller Attribute "objectClass: univentionObject"
> * Ausführen des Befehls univention-object-type-migrate

* "univentionObjectType" muss zuerst auch noch aus dem Index (UCR-Variable ldap/index/eq) entfernt werden.
Comment 3 Alexander Kläser univentionstaff 2012-03-29 16:16:35 CEST
Der Fehler wurde jetzt für 3.0-2 behoben insofern, dass im Falle des beschriebenen Fehlers eine Fehlermeldung mit einem Hinweis auf eine fehlende LDAP-Schema-Erweiterung ausgegeben wird. Changelog wurde hinzugefügt.


 univention-directory-manager-modules (7.0.228-2) unstable; urgency=low
 .
   * univention-object-type-migrate: added user-friendly error message in case
     LDAP schema extensions are not installed correctly; Bug #26304
Comment 4 Andreas Büsching univentionstaff 2012-06-18 10:58:52 CEST
Die Fehlermeldung wird jetzt angezeigt. Allerdings kommt sie nur, wenn ich -v angebe. Soll das so?

root@master:~# /usr/share/univention-directory-manager-tools/univention-object-type-migrate -v -a
ERROR: Could not set univentionObjectType! ({'info': 'objectClass: value #8 invalid per syntax', 'desc': 'Invalid syntax'})
It seems that the corresponding LDAP schema extensions are not installed correctly.

Desweiteren habe ich festgestellt, dass das Tool bei Objekten stirbt bei denen univentionObject existiert, aber univentionObjectType nicht gesetzt ist.

root@master:~# /usr/share/univention-directory-manager-tools/univention-object-type-migrate -v -n
Would modify 'dc=errata,dc=test'
Would modify 'cn=samba,dc=errata,dc=test'
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-object-type-migrate", line 158, in <module>
    if not main(options):
  File "/usr/share/univention-directory-manager-tools/univention-object-type-migrate", line 146, in main
    elif attributes['univentionObjectType'][0] != matches[0]:
KeyError: 'univentionObjectType'


ChangeLog-Eintrag existiert
Comment 5 Alexander Kläser univentionstaff 2012-06-19 13:37:19 CEST
(In reply to comment #4)
> Die Fehlermeldung wird jetzt angezeigt. Allerdings kommt sie nur, wenn ich -v
> angebe. Soll das so?

Ich denke das ist OK, da die Fehlermeldung genauso wie die anderen Fehlermeldungen ausgegeben wird. Wenn das nicht ok ist, würde ich vorschlagen, einen neuen Bug für die Ausgabe der Fehlermeldungen anzulegen.

> Desweiteren habe ich festgestellt, dass das Tool bei Objekten stirbt bei denen
> univentionObject existiert, aber univentionObjectType nicht gesetzt ist.

Das ist ein konstruierter Fall und kommt so nicht in produktiven Umgebungen vor, univentionObjectType ist ein Must-Attribut.

→ RESOLVED :)
Comment 6 Andreas Büsching univentionstaff 2012-06-19 13:38:48 CEST
(In reply to comment #5)
> (In reply to comment #4)
> > Die Fehlermeldung wird jetzt angezeigt. Allerdings kommt sie nur, wenn ich -v
> > angebe. Soll das so?
> 
> Ich denke das ist OK, da die Fehlermeldung genauso wie die anderen
> Fehlermeldungen ausgegeben wird. Wenn das nicht ok ist, würde ich vorschlagen,
> einen neuen Bug für die Ausgabe der Fehlermeldungen anzulegen.

OK
 
> > Desweiteren habe ich festgestellt, dass das Tool bei Objekten stirbt bei denen
> > univentionObject existiert, aber univentionObjectType nicht gesetzt ist.
> 
> Das ist ein konstruierter Fall und kommt so nicht in produktiven Umgebungen
> vor, univentionObjectType ist ein Must-Attribut.

Stimmt.

-> Verified
Comment 7 Stefan Gohmann univentionstaff 2012-07-20 15:25:24 CEST
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".