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):
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.
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