Bug 18507 - univention-install-config-registry-info: Unnütze Fehlermeldungen
univention-install-config-registry-info: Unnütze Fehlermeldungen
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCR
UCS 2.2
Other Linux
: P5 normal (vote)
: UCS 3.1
Assigned To: Philipp Hahn
Sönke Schwardt-Krummrich
: interim-1
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-27 17:13 CEST by Jan Christoph Ebersbach
Modified: 2012-12-12 21:09 CET (History)
1 user (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): Further conceptual development, Troubleshooting
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Christoph Ebersbach univentionstaff 2010-05-27 17:13:37 CEST
Das Tool univention-install-config-registry-info liefert keine verwertbaren Fehlermeldungen, sollten die Variablen-Definitionen Fehler enthalten.

In der Datei /usr/lib/python2.4/site-packages/univention/config_registry_info.py wird geprüft, ob eine Variable gültig ist, dazu wird der folgende Code ausgeführt:

 53  ->			for key in ( 'description', 'type', 'categories' ):
 54  				if not self.get( key, None ):
 55  					return False

Wenn nun einer dieser Werte nicht gesetzt wird, so erscheint die Fehlermeldung "The following variable definition are invalid: <VARIABLE>", jedoch ohne einen Hinweis auf das eigentliche Problem.

Als Eingabe habe ich eine eine .univention-config-registry-variables-info-Datei mit dem folgenden Inhalt verwendet:

[horde/passwd/ldap/base]
Description[de]=LDAP-Basis eines alternativen LDAP-Servers für URL-Passwortänderungen
Description[en]=LDAP base of an alternative LDAP server for URL based password changes
Type=str

Wünschenswert wäre die Ausgabe, dass der Wert für z.B. categories nicht definiert wurde und deshalb die Installation der Info-Files fehlgeschlagen ist.
Comment 1 Philipp Hahn univentionstaff 2012-08-03 22:15:47 CEST
Die univention-install-* Programme geben nun eine bessere Fehlermeldung aus.

svn34610, univention-config-registry_8.0.1-1.389.201208032206
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2012-09-14 17:37:19 CEST
Dem ucslint-Testframework fehlen noch die Files
- 0000-univention-category-info.correct
- 0000-univention-service-info.correct
- 0000-univention-variable-info.correct
→ REOPEN

Fehlende oder falsch benannte Variablen oder Values werden von den univention-install-* Tools korrekt moniert. → OK

Changelogeintrag → OK

Falls man es schafft, keine Sections oder eine defekte Section einzubauen, werden aktuell folgende Tracebacks ausgegeben, die aber genügend Hinweise enthalten, was wo falsch ist. Ich denke, das kann erstmal so bleiben. 
→ WORKFORME

(UCS-3.1) sschwardt@dave:~/git/branches-3.1/ucs/management/univention-management-console$ univention-install-service-info ; echo $?
Traceback (most recent call last):
  File "/usr/bin/univention-install-service-info", line 93, in <module>
    main()
  File "/usr/bin/univention-install-service-info", line 87, in main
    install_services(info, package)
  File "/usr/bin/univention-install-service-info", line 47, in install_services
    info.read_services(source)
  File "/usr/lib/pymodules/python2.6/univention/service_info.py", line 179, in read_services
    cfg.read( filename )
  File "/usr/lib/python2.6/ConfigParser.py", line 286, in read
    self._read(fp, filename)
  File "/usr/lib/python2.6/ConfigParser.py", line 482, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: debian/univention-management-console-server.univention-service, line: 1
'[univention-management-console-server\n'
1
 (UCS-3.1) sschwardt@dave:~/git/branches-3.1/ucs/management/univention-management-console$ univention-install-service-info ; echo $?
Traceback (most recent call last):
  File "/usr/bin/univention-install-service-info", line 93, in <module>
    main()
  File "/usr/bin/univention-install-service-info", line 87, in main
    install_services(info, package)
  File "/usr/bin/univention-install-service-info", line 47, in install_services
    info.read_services(source)
  File "/usr/lib/pymodules/python2.6/univention/service_info.py", line 179, in read_services
    cfg.read( filename )
  File "/usr/lib/python2.6/ConfigParser.py", line 286, in read
    self._read(fp, filename)
  File "/usr/lib/python2.6/ConfigParser.py", line 510, in _read
    raise e
ConfigParser.ParsingError: File contains parsing errors: debian/univention-management-console-server.univention-service
        [line  8]: '[univention-management-console-server\n'
1
Comment 3 Philipp Hahn univentionstaff 2012-09-18 09:15:50 CEST
svn35679, ucslint_3.0.4-2.53.201209180651
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2012-09-18 10:53:06 CEST
Dateien sind jetzt enthalten. Testframework läuft durch. → VERIFIED
Comment 5 Stefan Gohmann univentionstaff 2012-12-12 21:09:42 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".