Bug 765717 - RFE: make yum quiet when it pulls repos in %post for the first time
Summary: RFE: make yum quiet when it pulls repos in %post for the first time
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: lab controller
Version: 0.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ---
Assignee: Bill Peck
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-09 08:37 UTC by Jan Stancek
Modified: 2019-05-22 13:40 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-15 00:16:07 UTC


Attachments (Terms of Use)

Description Jan Stancek 2011-12-09 08:37:14 UTC
Description of problem:
When yum pulls in repos for the first time in %post, it's showing progress bar. This progress bar is updated for each single package in repo. For Task Library with a lot of tests this means a lot of updates of progress bar.

This operation is expensive on some console types, for example on xen HVM guest, where it can easily flood serial driver:
Bug 501026 - 'serial8250: too much work for irq4' message when viewing serial console on SMP full-virtualized xen domU

At the moment HVM guest installation usually takes ~75-90 minutes, out of which almost 45-60 minutes is spent by yum updating progress bar.

This (yum) problem was acknowledged upstream:
http://lists.baseurl.org/pipermail/yum-devel/2011-December/008857.html
however we still could use a workaround in beaker, because it can save significant time for current/older RHEL releases.

The workaround is to make first yum usage silent, so that its progress bar is not redrawn on console.

For example, by doing following before first yum install in %post:
yum check-update --quiet

or making first "yum install" in %post quiet.

Comment 2 Jan Stancek 2012-01-05 13:48:57 UTC
I checked man pages of different yum versions. 
--quiet started to be supported somewhere between yum-3.2.1 and yum-3.2.8.
check-update is there at least since 2.1.1 (oldest yum I could find)

So, redirecting to file or /dev/null (if we don't care about output) looks safer:
yum check-update > /dev/null 2>&1
or (if we need to worry about things like --erroronfail)
yum check-update > /dev/null 2>&1 || true

Comment 3 Bill Peck 2012-01-09 15:00:07 UTC
Thanks.  I'll work on a patch for 0.8.1


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