Bug 1166277

Summary: OSE 2.2: oo-admin-yum-validator doesn't handle error code from failed subscription-manager repo-override calls
Product: OpenShift Container Platform Reporter: John W. Lamb <jolamb>
Component: InstallerAssignee: John W. Lamb <jolamb>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: high    
Version: 2.2.0CC: bleanhar, jokerman, libra-bugs, libra-onpremise-devel, mmccomas, pruan, yanywang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-enterprise-upgrade-2.2.3-1.el6op Doc Type: Bug Fix
Doc Text:
Cause: The subscription-manager package version 1.10.7 and higher now incorporates the "content override" feature, which typically requires network communication with a backend server. Certain functions of yum-validator for RHSM systems depend on this network traffic on systems where subscription-manager supports content overrides. yum-validator didn't properly handle situations where subscription-manager calls failed due to network-related issues (timeouts, connection resets, etc.) Consequence: subscription-manager related functions which had previously been virtually guaranteed to work - since they only operated on the local filesystem in older subscription-manager versions - now could raise unhandled exceptions due to network failures. Fix: Routines which depend on subscription-manager are now wrapped in exception-handling blocks, and network errors cause oo-admin-yum-validator to fail with a unique non-zero return value. Result: Scripts which depend on oo-admin-yum-validator can now detect that oo-admin-yum-validator failed due to network errors, and handle the failure appropriately. Users running oo-admin-yum-validator are now presented with a relevant error message instead of a confusing stack trace.
Story Points: ---
Clone Of: 1166270 Environment:
Last Closed: 2015-01-08 15:34:30 UTC Type: Bug
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: 1166270    
Bug Blocks: 1166276    

Comment 3 wangyanyan 2014-12-18 08:43:51 UTC
Verify step:
env: ose2.2.3/2014-12-16.1
Setup:
1.Register rhsm in env
2.Install oo-admin-yum-validator and yum-plugin-priorities 

Actions:
1.subscription-manager repo-override --repo=rhel-6-server-ose-2.2-jbosseap-rpms --add=enabled:0
2.Modify "/usr/lib64/python2.6/site-packages/yumvalidator/check_sources.py" file let it error in get_update_override_cmd, then execute "oo-admin-yum-validator  -o 2.2 -r client -r node-eap -f"

output:
...
A problem occured while using subscription-manager services. This often indicates a problem communicating with the subscription-manager server component. Please resolve the issue and try again.

subscription-manager failed, with these arguments: /usr/sbin/subscription-manager repo-override --repo=rhel-6-server-ose-2.2-jbosseap-rpms --add=enabled:1

Can find it retried a few times before failing

Comment 5 errata-xmlrpc 2015-01-08 15:34:30 UTC
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.

https://rhn.redhat.com/errata/RHBA-2015-0019.html