Bug 27956 - Traceback beim Entfernen eines nicht existierenden Objektes via UDM-CLI
Traceback beim Entfernen eines nicht existierenden Objektes via UDM-CLI
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Basic settings
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.1
Assigned To: Lukas Walter
Philipp Hahn
: interim-4
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-17 15:34 CEST by Sönke Schwardt-Krummrich
Modified: 2012-12-12 21:08 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): Cleanup
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2012-07-17 15:34:38 CEST
Im Joinskript 35univention-management-console-module-setup.inst wurde beim Update 3.0-1 nach 3.0-2 folgender UDM-Befehl auf einem DCBackup ausgeführt:

udm settings/umc_operationset remove "$@" --dn "cn=setup-wizard-all,cn=operations,cn=UMC,cn=univention,$ldap_base"

welcher mit folgendem beantwortet wird:

Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 233, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 387, in doit
    out=_doit(arglist)
  File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 1065, in _doit
    object=univention.admin.modules.lookup(module, co, lo, scope='base', superordinate=superordinate, base=dn, filter=filter, required=1, unique=1)[0]
IndexError: list index out of range
Comment 1 Janis Meybohm univentionstaff 2012-11-16 18:09:53 CET
Beim 3.0-2 Update auf billy aufgefallen:

univention-management-console-module-setup (5.0.198-1.363.201208071504) wird eingerichtet ...
Verwendung eines zweifelhaften Benutzernamens wird erlaubt.
Der Systembenutzer »__systemsetup__« existiert bereits. Programmende.
loaded pickle file /var/cache/univention-management-console/acls/__systemsetup__
warning: rule setup/* already exists
info: rule lib/server/* appended
loaded pickle file /var/cache/univention-management-console/acls/root
warning: rule setup/* already exists
info: rule lib/server/* appended
Object exists: cn=UMC,cn=univention,dc=knut,dc=univention,dc=de
Object exists: cn=UMC,cn=policies,dc=knut,dc=univention,dc=de
Object exists: cn=operations,cn=UMC,cn=univention,dc=knut,dc=univention,dc=de
Object exists: cn=default-umc-all,cn=UMC,cn=policies,dc=knut,dc=univention,dc=de
WARNING: cannot append cn=default-umc-all,cn=UMC,cn=policies,dc=knut,dc=univention,dc=de to univentionPolicyReference, value exists
No modification: cn=Domain Admins,cn=groups,dc=knut,dc=univention,dc=de
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 233, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 387, in doit
    out=_doit(arglist)
  File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 1065, in _doit
    object=univention.admin.modules.lookup(module, co, lo, scope='base', superordinate=superordinate, base=dn, filter=filter, required=1, unique=1)[0]
IndexError: list index out of range


Da wird ein 'umc_policy_append "default-umc-all" "setup-all"' aufgerufen.
Comment 2 Stefan Gohmann univentionstaff 2012-11-16 20:41:14 CET
Das Join Skript kann nicht erfolgreich ausgeführt werden, deshalb sollte das zum Release noch angepasst werden.
Comment 3 Lukas Walter univentionstaff 2012-11-21 16:31:38 CET
Ich habe den Traceback beseitigt.

In der Theorie müsste das Joinskript trotzdem wieder fehschlagen, da das Löschen eines nicht vorhandenen Objekts einen Rückgabewert von 3 zur Folge hat, was das dem Kommando angehängte "|| die" das Skript abbrechen lassen dürfte.
Da das nicht-Löschen eines nicht existierenden Objekts unkritisch ist (und ich das hier für den einzigen möglichen Fehschlag halte) habe ich das "|| die" entfernt.



univention-directory-manager-modules (8.0.99-1) unstable; urgency=low
  * fixed traceback when removing non-existent objects on cli
    (Bug #27956)

univention-system-setup (6.0.51-1) unstable; urgency=low
  * join script: do not die on failing try to remove old
    umc operation sets (Bug #27956)

svn 37408
Comment 4 Philipp Hahn univentionstaff 2012-11-27 09:44:07 CET
(In reply to comment #3)
> Ich habe den Traceback beseitigt.
OK: tritt nicht mehr auf.

> univention-directory-manager-modules (8.0.99-1) unstable; urgency=low
>   * fixed traceback when removing non-existent objects on cli
>     (Bug #27956)
OK: except IndexError

> univention-system-setup (6.0.51-1) unstable; urgency=low
>   * join script: do not die on failing try to remove old
>     umc operation sets (Bug #27956)
OK: kein "|| die" mehr, entspricht damit wieder der Version aus UCS-3.0-2

> svn 37408
OK: Code Review

OK: ChangeLog wurde noch leicht angepasst → svn15715
Comment 5 Stefan Gohmann univentionstaff 2012-12-12 21:08:09 CET
UCS 3.1-0 has been released: 
 http://forum.univention.de/viewtopic.php?f=54&t=2125

If this error occurs again, please use "Clone This Bug".