Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 489328

Summary: up2date fails with traceback
Product: Red Hat Enterprise Linux 4 Reporter: Marian Ganisin <mganisin>
Component: rhnlibAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED ERRATA QA Contact: Jan Hutaƙ <jhutar>
Severity: high Docs Contact:
Priority: high    
Version: 4.8CC: aowens, atodorov, benl, bkearney, bperkins, cperry, jhutar, psklenar, pthomas
Target Milestone: rcKeywords: Regression, Reopened
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 489920 (view as bug list) Environment:
Last Closed: 2009-05-18 20:14:41 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: 488328, 489920, 490076    
Attachments:
Description Flags
/var/log/up2date none

Comment 2 Alexander Todorov 2009-03-09 14:44:28 UTC
Created attachment 334525 [details]
/var/log/up2date

Last few lines of up2date output and up2date log attached.:

# up2date compat-dapl && update -fu

kernel-2.6.9-82.EL.ppc64.rp ########################## Done.                   
kernel-devel-2.6.9-82.EL.pp ########################## Done.                   
kernel-doc-2.6.9-82.EL.noar  kernel-doc-2.6.9-82.EL.noar  kernel-doc-2.6.9-82.EL.noar  kernel-doc-2.6.9-82.EL.noar  kernel-doc-2.6.9-82.EL.noar  There was a fatal error communicating with the server. The message was:
Not Found
[root@ibm-p5-185-01 ~]# up2date compat-dapl && up2date -fu 

Fetching Obsoletes list for channel: rhel-ppc-as-4...

Fetching Obsoletes list for channel: rhel-ppc-as-4-beta...

Fetching Obsoletes list for channel: rhel-ppc-as-4-extras...

Fetching Obsoletes list for channel: rhel-ppc-as-4-extras-beta...

Fetching Obsoletes list for channel: rhel-ppc-as-4-fastrack...

Fetching Obsoletes list for channel: rhel-ppc-as-4-cluster...

Fetching Obsoletes list for channel: rhel-ppc-as-4-cluster-beta...

Fetching Obsoletes list for channel: rhel-ppc-as-4-gfs-6.1...

Fetching Obsoletes list for channel: rhel-ppc-as-4-gfs-6.1-beta...

Fetching Obsoletes list for channel: rhn-tools-rhel-4-as-ppc...

Fetching rpm headers...
########################################

Name                                    Version              Rel               Arch
----------------------------------------------------------------------------------------
compat-dapl                             2.0.15              1.el4               ppc   


Testing package set / solving RPM inter-dependencies...
########################################
compat-dapl-2.0.15-1.el4.pp ########################## Done.                   
Trying to Resolve Dependencies
An error has occurred:
exceptions.TypeError
See /var/log/up2date for more information

Comment 3 Alexander Todorov 2009-03-09 14:47:32 UTC
On the affected system:

# cat /etc/sysconfig/rhn/up2date | grep webqa
noSSLServerURL=http://xmlrpc.rhn.webqa.redhat.com/XMLRPC
serverURL=https://xmlrpc.rhn.webqa.redhat.com/XMLRPC


I don't think this is a dupe of bug 488744 which reproduces with plain http connections.

Comment 4 Alexander Todorov 2009-03-09 14:49:18 UTC
This is a regression against RHEL4-U8-re20090227.1 which has up2date-4.8.1-17up2date-4.8.1-17 and was working properly.

Comment 5 Alexander Todorov 2009-03-09 14:50:57 UTC
on ia64 communication with the server broke at another point in time:

krb5-libs-1.3.4-61.el4.ia64 ########################## Done.                   
krb5-server-1.3.4-61.el4.ia ########################## Done.                   
krb5-workstation-1.3.4-61.e  krb5-workstation-1.3.4-61.e  krb5-workstation-1.3.4-61.e  krb5-workstation-1.3.4-61.e  krb5-workstation-1.3.4-61.e  There was a fatal error communicating with the server. The message was:
Not Found


# tail /var/log/up2date
[Mon Mar  9 10:11:03 2009] up2date logging into up2date server
[Mon Mar  9 10:11:03 2009] up2date successfully retrieved authentication token from up2date server
[Mon Mar  9 10:11:03 2009] up2date availablePackageList from network
[Mon Mar  9 10:24:29 2009] up2date A protocol error occurred: Not Found , attempt #1,
[Mon Mar  9 10:24:34 2009] up2date A protocol error occurred: Not Found , attempt #2,
[Mon Mar  9 10:24:39 2009] up2date A protocol error occurred: Not Found , attempt #3,
[Mon Mar  9 10:24:44 2009] up2date A protocol error occurred: Not Found , attempt #4,
[Mon Mar  9 10:24:49 2009] up2date A protocol error occurred: Not Found , attempt #5,

Comment 9 James Bowes 2009-03-09 21:19:18 UTC
This one is different. up2date uses the same url over and over again after it has been redirected once. up2date is happy with successfully downloading the required number of rpms, but they're not the right ones. When it comes time to install them, then problems happen.

For instance, from 'up2date xemacs':

.webqa.[root@i386-4as-6-m1 up2date]# file xemacs-*rpm
xemacs-21.4.15-15.EL4.i386.rpm:        RPM v3 bin i386 xemacs-21.4.15-15.EL4
xemacs-common-21.4.15-15.EL4.i386.rpm: RPM v3 bin i386 xemacs-21.4.15-15.EL4
xemacs-nox-21.4.15-15.EL4.i386.rpm:    RPM v3 bin i386 xemacs-21.4.15-15.EL4
.webqa.[root@i386-4as-6-m1 up2date]# ls -l xemacs-*rpm
-rw-r--r--  1 root root 2035284 Mar  9 16:30 xemacs-21.4.15-15.EL4.i386.rpm
-rw-r--r--  1 root root 2035284 Mar  9 16:30 xemacs-common-21.4.15-15.EL4.i386.rpm
-rw-r--r--  1 root root 2035284 Mar  9 16:30 xemacs-nox-21.4.15-15.EL4.i386.rpm

Comment 11 James Bowes 2009-03-10 15:22:28 UTC
Proposed fix:

# diff -u rpclib.py rpclib.new 
--- rpclib.py	2009-03-10 10:16:43.000000000 -0400
+++ rpclib.new	2009-03-10 10:17:52.000000000 -0400
@@ -317,6 +317,8 @@
             try:
                 if self._redirected: 
                     type, uri = urllib.splittype(self._redirected)
+
+                    self._redirected = None
                     host, handler = urllib.splithost(uri) 
                     response = self._transport.request(host, handler, 
                         request, verbose=self._verbose) 
@@ -362,7 +364,6 @@
                 raise InvalidRedirectionError(
                     "HTTPS redirected to HTTP is not supported")
 
-            self._host, self._handler = urllib.splithost(uri)
             if not self._handler:
                 self._handler = "/RPC2"
 

The first hunk is the important part, and causes the redirected uri to be 'forgotten' so that we don't use that uri immediately when doing a new request.

Prad, what do you think?

Comment 12 James Bowes 2009-03-10 15:23:10 UTC
*** Bug 484744 has been marked as a duplicate of this bug. ***

Comment 13 RHEL Program Management 2009-03-13 04:21:38 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 14 Pradeep Kilambi 2009-03-16 18:26:30 UTC
fixed! Thanks for the patch James!

Sending        rhnlib/rhn/rpclib.py
Transmitting file data .
Committed revision 182529.

test:

# up2date samba

Fetching Obsoletes list for channel: rhel-i386-as-4...

Fetching rpm headers...

########################################

Name                                    Version              Rel               Arch
----------------------------------------------------------------------------------------
samba                                   3.0.28              0.el4.9             i386  

Testing package set / solving RPM inter-dependencies...

########################################
samba-3.0.28-0.el4.9.i386.r  %%%%%%%%%%%%%%%%%%%%%%%% xmlrpc.rhn.webqa.redhat.com
AAAAAAAAAAAAAAAAAAA xmlrpc.rhn.webqa.redhat.com /XMLRPC/$RHN/rhel-i386-as-4/getPackage/samba-3.0.28-0.el4.9.i386.rpm
REDIRECTEDDDDDDDDDDDDD:::https://content-xmlrpc.rhn.webqa.redhat.com:2443/cgi-bin/fake-akamai.cgi/rhn/public/NULL/samba/3.0.28-0.el4.9/i386/samba-3.0.28-0.el4.9.i386.rpm?__gda__=1237228459_154b75e5414c9a2e0439820003396384 

########################## Done.                   
gamin-0.1.7-1.4.EL4.i386.rp  %%%%%%%%%%%%%%%%%%%%%%%% 

########################## Done.                   
samba-common-3.0.28-0.el4.9  %%%%%%%%%%%%%%%%%%%%%%%% xmlrpc.rhn.webqa.redhat.com
AAAAAAAAAAAAAAAAAAA xmlrpc.rhn.webqa.redhat.com /XMLRPC/$RHN/rhel-i386-as-4/getPackage/samba-common-3.0.28-0.el4.9.i386.rpm
REDIRECTED:::https://content-xmlrpc.rhn.webqa.redhat.com:2443/cgi-bin/fake-akamai.cgi/rhn/public/NULL/samba-common/3.0.28-0.el4.9/i386/samba-common-3.0.28-0.el4.9.i386.rpm?__gda__=1237228463_d32b2b50905e8fd1e32ded43ff51204c 


Connection: close
Transfer-Encoding: chunked
Content-Type: application/octet-stream
 200 OK
########################## Done.                   
Preparing              ########################################### [100%]

Installing...
   1:samba-common           ########################################### [100%]
   2:gamin                  ########################################### [100%]
   3:samba                  ########################################### [100%]

X-RHN-Client-Version: 1
Content-Type: text/xml
Via: 1.1 xmlrpc.rhn.webqa.redhat.com
Connection: close
 200 OK
The following packages were added to your selection to satisfy dependencies:

Name                                    Version        Release
--------------------------------------------------------------
gamin                                   0.1.7          1.4.EL4             
samba-common                            3.0.28         0.el4.9

Comment 22 Pradeep Kilambi 2009-05-13 14:15:47 UTC
*** Bug 497364 has been marked as a duplicate of this bug. ***

Comment 23 errata-xmlrpc 2009-05-18 20:14:41 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