Bug 488744

Summary: Redirecting from http to https urls still uses the http protocol
Product: Red Hat Enterprise Linux 4 Reporter: James Bowes <jbowes>
Component: rhnlibAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED ERRATA QA Contact: Jan Hutaƙ <jhutar>
Severity: medium Docs Contact:
Priority: low    
Version: 4.9CC: atodorov, bkearney, borgan, bperkins, jhutar, mganisin, mkollar
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 489921 (view as bug list) Environment:
Last Closed: 2009-05-18 20:14:57 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: 489921, 490076    

Description James Bowes 2009-03-05 16:14:54 UTC
To reproduce:
 * register to a cdn enabled env with an http:// url
 * run up2date zsh
 * get an exceptions.TypeError

For more details, run wireshark or similar to watch your tcp communication. The client gets redirected to a CDN provider (which has an https address), and tries to communicate with it via plain http. I think the root cause is that the original http connection object is being used, when a new https one should be initialized.

Comment 1 Pradeep Kilambi 2009-03-09 15:00:15 UTC
*** Bug 489328 has been marked as a duplicate of this bug. ***

Comment 3 Brock Organ 2009-03-09 20:56:34 UTC
i'm getting the traceback with both http and https urls updated in /etc/sysconfig/rhn/up2date, testing manually ... here are the steps I used.  make the change to the up2date config file:

# sed -i -e 's/noSSLServerURL=http\:\/\/xmlrpc.rhn.redhat.com\/XMLRPC/noSSLServerURL=http\:\/\/xmlrpc.rhn.webqa.redhat.com\/XMLRPC/g' -e 's/serverURL=https\:\/\/xmlrpc.rhn.redhat.com\/XMLRPC/s
erverURL=https\:\/\/xmlrpc.rhn.webqa.redhat.com\/XMLRPC/g' /etc/sysconfig/rhn/up2date 

Install the gpg key:

# rpm --import /usr/share/rhn/RPM-GPG-KEY

run rhn_register:

# rhn_register

I subscribed to the child beta channel ...

# up2date --list
# up2date --list | grep -i kernel

I verified the kernel version matched the 0306.2 test tree ...

# up2date -fu --nosig

Then after running a while, I got the traceback:

[Mon Mar  9 16:35:13 2009] up2date   File "/usr/sbin/up2date", line 1315, in ?
    sys.exit(main() or 0)
   File "/usr/sbin/up2date", line 816, in main
    fullUpdate, dryRun=options.dry_run))
   File "/usr/sbin/up2date", line 1163, in batchRun
    batch.run()
   File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 99, in run
    self.__installPackages()
   File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 263, in __installPackages
    self.kernelsToInstall = up2date.installPackages(self.packagesToInstall, self.rpmCallback)
   File "/usr/share/rhn/up2date_client/up2date.py", line 866, in installPackages
    runTransaction(ts, added, removed,rpmCallback, rollbacktrans = rollbacktrans)
   File "/usr/share/rhn/up2date_client/up2date.py", line 727, in runTransaction
    (ts, deps, added) = solve_deps(ts, deps, added)
   File "/usr/share/rhn/up2date_client/up2date.py", line 665, in solve_deps
    allPkgs = rhnPackageInfo.getAllAvailableAllArchPackageList()
   File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 278, in getAllAvailableAllArchPackageList
    package_list = allAvailablePackageList(
   File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 218, in allAvailablePackageList
    progressCallback = progressCallback )
   File "/usr/share/rhn/up2date_client/rpcServer.py", line 238, in doCall
    ret = apply(method, args, kwargs)
   File "/usr/share/rhn/up2date_client/repoDirector.py", line 25, in listAllPackages
    return self.handlers[channel['type']].listAllPackages(channel, msgCallback, progressCallback)
   File "/usr/share/rhn/up2date_client/rpmSource.py", line 241, in listAllPackages
    msgCallback, progressCallback)
   File "/usr/share/rhn/up2date_client/repoBackends/up2dateRepo.py", line 292, in listAllPackages
    rpmSourceUtils.saveListToDisk(list, filePath,globPattern)
   File "/usr/share/rhn/up2date_client/rpmSourceUtils.py", line 54, in saveListToDisk
    infostring = rpclib.xmlrpclib.dumps((list, ""))
   File "/usr/lib/python2.3/xmlrpclib.py", line 961, in dumps
    data = m.dumps(params)
   File "/usr/lib/python2.3/xmlrpclib.py", line 604, in dumps
    dump(v, write)
   File "/usr/lib/python2.3/xmlrpclib.py", line 616, in __dump
    f(self, value, write)
   File "/usr/lib/python2.3/xmlrpclib.py", line 708, in dump_instance
    self.dump_struct(value.__dict__, write)
   File "/usr/lib/python2.3/xmlrpclib.py", line 694, in dump_struct
    dump(value[k], write)
   File "/usr/lib/python2.3/xmlrpclib.py", line 616, in __dump
    f(self, value, write)
   File "/usr/lib/python2.3/xmlrpclib.py", line 620, in dump_nil
    raise TypeError, "cannot marshal None unless allow_none is enabled"

this was tested using U7 -> RHEL4-U8-re20090306.2 s390-AS ...

Comment 11 errata-xmlrpc 2009-05-18 20:14:57 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0974.html