Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 765717

Summary: RFE: make yum quiet when it pulls repos in %post for the first time
Product: [Retired] Beaker Reporter: Jan Stancek <jstancek>
Component: lab controllerAssignee: Bill Peck <bpeck>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.7CC: bpeck, dcallagh, gozen, jburke, mcsontos, pbunyan, rmancy, stl
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: 2012-03-15 00:16:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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