Bug 648403

Summary: Pushing to Sat530 with newest rhnpush makes RHN traceback
Product: Red Hat Satellite 5 Reporter: Šimon Lukašík <slukasik>
Component: ClientAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Jiri Kastner <jkastner>
Severity: medium Docs Contact:
Priority: high    
Version: 540CC: cperry, jhutar, jkastner, jpazdziora, msuchy, slukasik, tlestach
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhnpush-5.5.4-11 spacewalk-backend-1.2.13-30 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 600347 Environment:
Last Closed: 2011-03-07 09:23:46 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: 600347    
Bug Blocks: 646488, 677549    
Attachments:
Description Flags
RHN Traceback none

Description Šimon Lukašík 2010-11-01 08:20:03 UTC
+++ This bug was initially created as a clone of Bug #600347 +++


Description of problem:
Pushing rpm into the Sat530 with rhnpush from rhn-tools 540 works.
But RHN Traceback is produeced on server side.

Version-Release number of selected component (if applicable):
Server: Satellite 5.3.0 (+ erratas)
Client: rhnpush-5.5.4-2.el5sat

How reproducible:
always


Steps to Reproduce:
1. Push some arbitrary rpm (not sha256)


Actual results:
Push works but traceback is generated.

Expected results:
No traceback.

Comment 1 Šimon Lukašík 2010-11-01 08:21:02 UTC
Created attachment 456818 [details]
RHN Traceback

Comment 3 Miroslav Suchý 2010-12-20 15:28:05 UTC
This function has been added on server side in commit d5c618ef2a9a80e74c320ef6c855d3bb4f0d5025

Fix commited as commit: 62a945eaee0360167baf5f7542678613319d5bd5

648403 - do not call getPackageChecksumBySession directly

while we can use it to determine if the call is implemented, it will 
cause traceback on target satellite. In this case:

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/server/apacheRequest.py", line 118, in call_function
    func = self.method_ref(method)
  File "/usr/share/rhn/server/apacheRequest.py", line 439, in method_ref
    raise UnknownXML("function: %s invalid" % (method,))
UnknownXML: Invalid request received (function: packages.getPackageChecksumBySession invalid).

We should rather use capabilities. However we could not travel back in time
and set some capability in past. But just two months before introducing call 
getPackageChecksumBySession we created new capability xmlrpc.packages.extended_profile
in version 2. We can use it instead.

And you may ask why removing server from function arguments and instead creating 
new one? Well... that is because that argument is type of up2date_client.rpcServer.RetryServer 
while this new one server is of type up2date_client.rhnserver.RhnServer. That previous one
do not have capabilities defined and populated.

Comment 4 Miroslav Suchý 2010-12-23 11:56:20 UTC
One small (but important fix) - my fix use rhnParent for test if call exist, we should rather test capability of server given on command line. 
Fixed in spacewalk.git commit af438251a7af2e8c4cbb84afbe84d112f9c3c62c

Comment 6 Miroslav Suchý 2011-01-06 14:30:20 UTC
cherrypicked to satellite.git as commits:
0c817ed5c7d25395d79775f8201ceccc7923dbcb
59fa489643fe5e534765790f46c7c19ca8501c92

Comment 9 Miroslav Suchý 2011-01-25 12:26:44 UTC
problem with rhn-client-tools:
commited to spacewalk.git as commit 7850cb478d0947f497c262e28792974c86806434
cherry picked to satellite.git as commit 2e26e75de2d3b78100e7b1e621b506215e156b18

Comment 10 Miroslav Suchý 2011-01-28 17:30:26 UTC
Fixed in satellite.git in commits:
20719830c01644fa620a5161d0dc059c20db0de4
390914e93aeaec9dfe547624f720528a0e92dfa0
on rhel4 we are missing a lot of things (and mainly up2date_client.rhnserver), therefore this fix is *only* for rhel5,6.
On RHEL4 rhnpush will still produce TB on server side. There is nothing I can do it.
If somebody stumble upon this BZ I recommend you to open BZ for your version of RHN Satellite and request to fix it in Satellite code of your version as there is no other option.

Comment 11 Miroslav Suchý 2011-01-28 21:48:09 UTC
I finally find way how not produce TB even on Red Hat Enterprise Linux 4
fix in spacewalk: 8bdb009008bf6161fb5808c8c29f5ae273cce461
cherrypicked to satellite as 5cc0c44044bac8db6ddbf61b9d573dc2cff6cf0d

Comment 13 Miroslav Suchý 2011-02-01 12:13:34 UTC
Fixed that problem with requires on rhel5.

That problem on el6 is not problem, because it is push to sat53 and it does not support sha256 checksums.

Comment 14 Jiri Kastner 2011-02-14 10:55:37 UTC
verified on rhel4, rhel5 and rhel6 against satellite 5.4, 5.3 and 5.2

Comment 18 Miroslav Suchý 2011-03-02 13:14:42 UTC
previous comment meant that rhnpush now depends on rhncfg,
I broke this dependency in commits:
2837533f1e2c7e0c8849f3bca5f8aebd2275f909
f35470fd57c7cf6af49f57501309f1fde815e3a1

Comment 21 errata-xmlrpc 2011-03-07 09:23:46 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-2011-0323.html