Bug 1196629

Summary: log librepo debug data in verbose mode
Product: [Fedora] Fedora Reporter: Jan Sedlák <jsedlak>
Component: dnfAssignee: Michal Luscon <mluscon>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: anaconda-maint-list, g.kaviyarasu, jonathan, jsilhan, kparal, lbrabec, mluscon, pnemade, redhat-bugzilla, rholy, tim.lauridsen, tmlcoch, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-19 08:34:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1192524, 1205341, 1206878    

Description Jan Sedlák 2015-02-26 12:19:02 UTC
Description of problem:
I have searched through logs in /tmp and configs in /etc but I couldn't find any place where is written what mirror anaconda actually uses as "closest mirror". We are currently facing some networking issues on our machines, downloading packages and metadata takes too long, but we are unable to investigate from what mirror it downloads.

It would be great if there was some place where anaconda would log what repo it uses for downloading metadata and packages.

Version-Release number of selected component (if applicable):
22.20.1-1

Comment 1 David Shea 2015-02-26 18:30:41 UTC
dnf is in a better position to log that kind of information. Anaconda is just passing it a mirrorlist and isn't concerned with the details after that.

Comment 2 Honza Silhan 2015-03-03 09:58:57 UTC
DNF could log that from verbose mode if librepo doesn't already logging that on it's own. Does it, Tomas?

Comment 3 Kamil Páral 2015-03-03 10:16:27 UTC
Please note we would like to see not only the initially chosen mirror from the metalink/mirrorlist, but also any updates to it. We're not sure how it works internally, but I assume that if the chosen mirror is too slow, anaconda/dnf switches to a different mirror. If that is again slow, or perhaps outdated (missing some packages), it tries yet another mirror. We would like to see all these changes in some log, so that we can debug network issues. Thanks.

Comment 4 Tomas Mlcoch 2015-03-03 15:52:12 UTC
Hi Jan, you can set own debug log handler and get detailed information about all internal processes in librepo. See [1]. Drawback of using this debug handler is that librepo becomes thread unsafe (you still can use threads, but librepo cannot be used in multiple ones simultaneously).
In case that this is a problem for your usage, I can add a new option that allow you to specify a logfile and librepo can generate the log file by itself.

[1] http://tojaj.github.io/librepo/lib.html#debugging

Comment 5 Jan Sedlák 2015-03-04 08:24:34 UTC
We are not using librepo directly. We want dnf to log these things when used in Anaconda. Jan, could dnf log librepo's debug log too when in verbose mode? And how to enable verbose mode in Anaconda anyway?

Comment 6 Honza Silhan 2015-03-04 13:31:18 UTC
(In reply to Jan Sedlák from comment #5)
> Jan, could dnf log librepo's debug log too when in verbose
> mode?

yes

> And how to enable verbose mode in Anaconda anyway?

conf.debuglevel = 10 [1]

[1] http://dnf.readthedocs.org/en/latest/api_conf.html#dnf.conf.Conf.debuglevel

Comment 7 Honza Silhan 2015-08-19 08:34:28 UTC
This bug report wasn't properly closed. The librepo logs are located in /var/log/dnf.librepo.log