Bug 24760 - improve debugging of univention updater
improve debugging of univention updater
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 5.0
All Linux
: P5 enhancement with 2 votes (vote)
: ---
Assigned To: UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-21 14:08 CET by Philipp Hahn
Modified: 2020-07-02 00:54 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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): Troubleshooting
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2011-11-21 14:08:47 CET
Es kommt öfters vor, das im Updater-Prozeß Fehler gesucht werden müssen und in den /etc/apt/sources.list.d/* Dateien dann nur eine wenig aussagekräftige Exception steht.
Bisher helfe ich mir dann immer damit, UniventionUpdater direkt aus einer interaktiven Shell heraus aufzurufen und darüber den Fehlerfall zu provozieren. Das ist zeitaufwändig und fehleranfällig.

Hilfreich wäre hier eine Kommandozeilenoption oder UCR-Einstellung, über den man ausführliche Informationen dazu bekommt, was der Updater gerade wo macht. Wichtig wäre mir hier vorallem (Zwischen-)Informationen zum Prozeß als nur das Ergebnis am Ende, das "etwas" schiefgegangen ist.

1. Ausgabe der HTTP-Anfragen und deren Antworten:

/usr/share/pyshared/univention/updater/tools.py:271
 http_handler = urllib2.HTTPHandler(debuglevel=1)
 ...
 opener = urllib2.build_opener(http_handler, ...)

from univention.updater import UniventionUpdater
u = UniventionUpdater()
print u.print_component_repositories()
Comment 1 Philipp Hahn univentionstaff 2012-02-23 15:22:56 CET
Beim Updater funktioniert auch folgendes in einer interaktiven Python-Session:

import univention.debug as ud
from univention.updater.tools import UniventionUpdater
ud.init('stderr', ud.NO_FLUSH, ud.NO_FUNCTION)
ud.set_level(ud.NETWORK, ud.ALL)
updater = UniventionUpdater()
print updater.print_errata_repositories()
Comment 2 Philipp Hahn univentionstaff 2015-03-27 08:41:08 CET
We should introduce an easy way to enable verbose debugging.
Bug #36548 required some very deep hacking to get the right data for the analysis.
See <https://hutten.knut.univention.de/mediawiki/index.php/Philipp_memo/debug#Univention_Updater> for my internal notes.
Comment 3 Stefan Gohmann univentionstaff 2017-06-16 20:36:50 CEST
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4.

If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
Comment 4 Stefan Gohmann univentionstaff 2017-08-08 07:07:48 CEST
This issue has been filed against UCS 3.0.

UCS 3.0 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.
Comment 5 Philipp Hahn univentionstaff 2017-09-11 09:23:17 CEST
This is still a problem with UCS-4.2: I get asked that very often, how to debug the updater.
<https://hutten.knut.univention.de/mediawiki/index.php/Philipp_memo/debug#Univention_Updater> is a good start, but not for users or support.
Comment 6 Philipp Hahn univentionstaff 2018-05-02 15:01:12 CEST
ucs-3.0/ucs@34053 from 2012-07-10 introduced a bug in tools.py, which I can trigger with repository/online=no:

>  File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
>    msg = self.format(record)
>  File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
>    return fmt.format(record)
>  File "/usr/lib/python2.7/logging/__init__.py", line 465, in format
>    record.message = record.getMessage()
>  File "/usr/lib/python2.7/logging/__init__.py", line 329, in getMessage
>    msg = msg % self.args
> ValueError: incomplete format
> Logged from file tools.py, line 554

[4.3-0] a62e50db18 Bug #24760 up: Fix format string error
Comment 7 Philipp Hahn univentionstaff 2019-01-04 14:09:10 CET
With Bug #47913 there is UCRV updater/debug/level, but that works only for "univention-updater" and not with any other tool. Initializing the Python logging system is still very useful for debugging.