Bug 167454 - yum output to stdout and /var/log/yum.log should be line-buffered
Summary: yum output to stdout and /var/log/yum.log should be line-buffered
Alias: None
Product: Fedora
Classification: Fedora
Component: yum   
(Show other bugs)
Version: 4
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-09-02 19:31 UTC by Alexandre Oliva
Modified: 2014-01-21 22:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-21 19:39:23 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Alexandre Oliva 2005-09-02 19:31:54 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8b3) Gecko/20050827 Fedora/1.1-0.2.8.deerpark.alpha2 Firefox/1.0+

Description of problem:
If a box fails in the middle of a yum update (say, a power failure, accidental reboot, etc), or even if yum has to be killed because of some error condition that rpm turns into a deadlock, /var/log/yum.log will end up missing information on updates, and might have incomplete lines.  Output to yum.log should be line-buffered, if buffered at all.

Along the same lines, output to stdout is line buffered only if yum is started from an interactive terminal.  Running ssh <box> -l root -t yum -y update is quite noisy, but omitting the -t will make it impossible to watch the progress of the isntallation.  It's not ssh that's buffering, though; if I kill yum with -9, the output that should have already gone out (from the timing of the session) doesn't make to the other end of the ssh connection, as it would should it be in SSH's buffers.  The output is held back by yum itself, so it can even be completely lost if yum has to be killed as in the case above.

Version-Release number of selected component (if applicable):
yum-2.4.0-0.fc4 yum-2.4.0-2

How reproducible:

Steps to Reproduce:
1.ssh <box> -l root yum update
2.Monitor yum with strace until it starts downloading packages
3.Kill it with -9, before it starts a transaction or grabs any locks :-)

Actual Results:  You won't get the expected output at the time the ssh connection is terminated

Expected Results:  Output should be sent to stdout as it's ready.  This is even more critical for /var/log/yum.log.  Ideally, cleanups and completion messages would be logged there as well, such that you can tell whether an install was aborted for whatever reason, and can take corrective measures.

Additional info:

Comment 1 Jeremy Katz 2005-09-21 19:39:23 UTC
This should hopefully be resolved upstream with moving to the use of python's
logging package instead of the older module being used in yum

Note You need to log in before you can comment on or make changes to this bug.