Bug 426261

Summary: Good: only working with up2date client, not with yum clients
Product: Red Hat Enterprise Linux 5 Reporter: Mathieu Bilodeau <mathieu.bilodeau>
Component: yum-rhn-pluginAssignee: John Matthews <jmatthew>
Status: CLOSED DUPLICATE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 5.0CC: msuchy, rhn-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-30 19:28:25 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 Mathieu Bilodeau 2007-12-19 17:03:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b2) Gecko/2007121016 Firefox/3.0b2

Description of problem:
Works when using up2date on RHEL4 and older through https connection to our rhn-proxy.

Does not work when usinge yum on RHEL5 through https connection to our rhn-proxy.


Version-Release number of selected component (if applicable):


How reproducible:
Always


Steps to Reproduce:
as root on my RHEL5.

1. Changed the file /etc/sysconfig/rhn/up2date with my ServerURL and my SSLCert.
2. service rhnsd restart
3. yum update yum
 or
3. yum install joe


Actual Results:
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 180, in main
    base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 395, in doTransaction
    problems = self.downloadPkgs(downloadpkgs)
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 690, in downloadPkgs
    cache=po.repo.http_caching != 'none',
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 447, in getPackage
    cache=cache
  File "/usr/lib/yum-plugins/rhnplugin.py", line 209, in _getFile
    start, end, copy_local, checkfunc, text, reget, cache)
  File "/usr/lib/yum-plugins/rhnplugin.py", line 298, in _noExceptionWrappingGet
    return result
UnboundLocalError: local variable 'result' referenced before assignment


Yum can connect to the rhn-proxy, found needed packages, download them and they end up in /var/cache/yum/[...]/packages. For some reasons, these rpm packages are not installable, they looks truncated and they have different size.


Expected Results:
The selected packages should be installed.

Additional info:

Comment 1 Miroslav Suchý 2008-01-03 10:20:41 UTC
Please can you provide information about version you use?
Should I assume you use Satellite 4.2.0 (or 5.0 or directly rhn.redhat.com) and
proxy 4.2?
Can you provide me your version of yum-rhn-plugin too?

Comment 2 Mathieu Bilodeau 2008-01-03 14:24:10 UTC
Here's more details:
Red Hat Network Proxy 4.2 (not satellite) running on a Red Hat Enterprise Linux
AS release 4 (Nahant Update 6).

on my RHEL5 Update 1 server:
yum-metadata-parser-1.0-8.fc6
yum-updatesd-3.0.1-5.el5
yum-3.0.1-5.el5
yum-rhn-plugin-0.5.2-3.el5


Comment 3 Miroslav Suchý 2008-01-28 10:59:26 UTC
Mathieu, are you sure you have in /etc/sysconfig/rhn/up2date set variable
serverURL and not ServerURL? I.e. first letter is not upper case.

According to my searching this is yum-rhn-plugin and happen when there is no
base url. Hmm, the plugin should return some nice error like:
You did not specify url of satelllite, proxy in serverURL.

Reassign to yum-rhn-plugin component

Comment 4 RHEL Program Management 2008-01-28 11:05:37 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Mathieu Bilodeau 2008-01-28 14:06:09 UTC
Here is my current /etc/sysconfig/rhn/up2date

serverURL[comment]=Remote server URL
serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC
#serverURL=https://rhn-proxy.my-url.com/XMLRPC

I've put in comments the line for my rhn-proxy because, well it does'nt work.
You'll notice i have  set the right variable.

Thanks to all


Comment 6 John Matthews 2008-01-28 14:49:19 UTC
Mathieu,
Refer to this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=378911

The "local variable 'result' referenced before assignment" is likely hiding the
true error message.  If you try the test package created by Justin Sherrill here: 
https://bugzilla.redhat.com/attachment.cgi?id=281351

It should allow the true error problem to be displayed.



Comment 7 Pradeep Kilambi 2008-01-30 19:28:25 UTC

*** This bug has been marked as a duplicate of 378911 ***