Bug 712047
Summary: | yum prints non-error messages when running in quiet mode | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jan Stodola <jstodola> |
Component: | subscription-manager | Assignee: | Chris Duryee <cduryee> |
Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | CC: | cduryee |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-12-06 17:15:11 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: | |||
Bug Depends On: | |||
Bug Blocks: | 682238, 691780, 743047 |
Description
Jan Stodola
2011-06-09 11:10:24 UTC
this is either coming from the rhn plugin or the entitlement plugin. This is coming from subscription-manager fixed in 303423da4cb265649ab9dbd4c790c8aa2f628d0a, master 0.95.6+ Although reported against RHEL61, I am verifying the fix is included in the subscription-manager package version that is targeted for release in RHEL62 as indicated by the errata in comment 4 Verifying Version... [root@jsefler-stage-6server ~]# rpm -q subscription-manager subscription-manager-0.96.7-1.el6.x86_64 Using the stage test environment and credentials for stage_test_2, I have registered a system and subscribed to (Red Hat Enterprise Linux Server) and a pool (High-Availability (8 sockets)) for which I do not have a product cert (83.pem) installed... [root@jsefler-stage-6server ~]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ ProductName: Red Hat Enterprise Linux High Availability (for RHEL Server) Status: Not Installed Expires: 06/13/2012 SerialNumber: 3204589806487586327 ContractNumber: 2394350 AccountNumber: 1465503 ProductName: Red Hat Enterprise Linux Server Status: Subscribed Expires: 06/12/2012 SerialNumber: 5920704196687448827 ContractNumber: 2394347 AccountNumber: 1465503 [root@jsefler-stage-6server ~]# ls /etc/pki/product 69.pem ^^^ NOTICE THERE IS NOT A PRODUCT CERT INSTALLED FOR HIGH AVAILABLITY. NOW LET'S QUIETLY YUM INSTALL SOME PACKAGES INCLUDING ONE FROM THE HA REPO... [root@jsefler-stage-6server ~]# yum list zsh ricci Loaded plugins: product-id, refresh-packagekit, subscription-manager Updating certificate-based repositories. rhel-6-server-rpms | 2.4 kB 00:00 rhel-ha-for-rhel-6-server-rpms | 2.7 kB 00:00 Available Packages ricci.x86_64 0.16.2-35.el6_1.1 rhel-ha-for-rhel-6-server-rpms zsh.x86_64 4.3.10-4.1.el6 rhel-6-server-rpms [root@jsefler-stage-6server ~]# yum -y --quiet install zsh ricci Installed products updated. [root@jsefler-stage-6server ~]# ls /etc/pki/product 69.pem 83.pem ^^^ Notice that product 83.pem was indeed installed, and... ^^^ VERIFIED THAT "duration: 602(ms)" and "installing: 83.pem" were indeed removed. However, "Installed products updated." is still getting printed despite the --quiet option passed to yum. THEREFORE moving back to NEW/FailedQA. This defect is more than just removing the print statements from the subscription-manager/product-id plugins. It's about these plugins acknowledging the yum --quiet option and then deciding when to print "Installed products updated." to stdout. 4a43f72 master 0.96.10+ There were two issues for this bug. The first was that there were "print" statements in the code for the duration time, which weren't being handled via the yum logger. These were cleaned up in the first commit. The second issue was that some calls were using conduit.error() for info messages instead of conduit.info(), so the --quiet option wasn't silencing what's essentially an informational message. Verifying Version... [root@jsefler-stage-6server ~]# rpm -q subscription-manager subscription-manager-0.96.9-1.git.10.adab5e3.el6.x86_64 [root@jsefler-stage-6server ~]# rpm -q python-rhsm python-rhsm-0.96.11-1.git.8.7061b8a.el6.noarch First let's yum install without --quiet and look for the "Installed products updated." info message coming from the subscription-manager plugin. [root@jsefler-stage-6server ~]# ls /etc/pki/product/ 69.pem [root@jsefler-stage-6server ~]# yum -y install zsh ricci Loaded plugins: product-id, refresh-packagekit, subscription-manager Updating certificate-based repositories. rhel-6-server-rpms | 2.4 kB 00:00 rhel-ha-for-rhel-6-server-rpms | 2.7 kB 00:00 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package ricci.x86_64 0:0.16.2-35.el6_1.1 will be installed ---> Package zsh.x86_64 0:4.3.10-4.1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ricci x86_64 0.16.2-35.el6_1.1 rhel-ha-for-rhel-6-server-rpms 614 k zsh x86_64 4.3.10-4.1.el6 rhel-6-server-rpms 2.1 M Transaction Summary ================================================================================ Install 2 Package(s) Total download size: 2.7 M Installed size: 4.3 M Downloading Packages: (1/2): ricci-0.16.2-35.el6_1.1.x86_64.rpm | 614 kB 00:00 (2/2): zsh-4.3.10-4.1.el6.x86_64.rpm | 2.1 MB 00:00 -------------------------------------------------------------------------------- Total 1.1 MB/s | 2.7 MB 00:02 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : zsh-4.3.10-4.1.el6.x86_64 1/2 Installing : ricci-0.16.2-35.el6_1.1.x86_64 2/2 Installed products updated. Installed: ricci.x86_64 0:0.16.2-35.el6_1.1 zsh.x86_64 0:4.3.10-4.1.el6 Complete! [root@jsefler-stage-6server ~]# ls /etc/pki/product/ 69.pem 83.pem [root@jsefler-stage-6server ~]# ^^^ Yes - "Installed products updated." was printed and the 83.pem product cert was installed for the high availability ricci package. Now let try again with the --quiet option and verify that the info message coming from subscription-manager is suppressed... [root@jsefler-stage-6server ~]# yum -y remove zsh ricci --quiet [root@jsefler-stage-6server ~]# rm -f /etc/pki/product/83.pem [root@jsefler-stage-6server ~]# ls /etc/pki/product/ 69.pem [root@jsefler-stage-6server ~]# yum -y install zsh ricci --quiet [root@jsefler-stage-6server ~]# ls /etc/pki/product/ 69.pem 83.pem [root@jsefler-stage-6server ~]# ^^^ VERIFIED - subscription-manager plugin now obeys the yum --quiet option and the product cert 83.pem was installed. moving to VERIFIED Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1695.html |