Bug 167454 - yum output to stdout and /var/log/yum.log should be line-buffered
yum output to stdout and /var/log/yum.log should be line-buffered
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
4
All Linux
medium Severity high
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-02 15:31 EDT by Alexandre Oliva
Modified: 2014-01-21 17:52 EST (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2005-09-02 15:31:54 EDT
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:
Always

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 15:39:23 EDT
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.