Bug 1450496

Summary: get possible orgs registration function removed from server side
Product: Red Hat Satellite 5 Reporter: Shannon Hughes <shughes>
Component: ServerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Radovan Drazny <rdrazny>
Severity: high Docs Contact:
Priority: high    
Version: 580CC: adujicek, galtukho, ggainey, kdixon, rdrazny, shughes, tasander, tlestach, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-backend-2.5.3-131-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-21 12:13:12 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:    
Bug Blocks: 1400201    

Description Shannon Hughes 2017-05-12 18:58:34 UTC
Description of problem:
We might have forgot about RHEL5 els clients on the following bz, 

https://bugzilla.redhat.com/show_bug.cgi?id=1395876

the server side function get_possible_orgs was removed from the spacewalk b7907dfe1d75d90d466b39a1e1b163b0a4ba5f35 and cherry picked as 0ec429208045552149cd64fe6dc91ff782074275 in satellite git. 

testing with RHEL5.11 shows the following error when the client makes the call up to satellite 5.8

Frame call_function in /usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py at line 154
                       fault = <type 'int'> -1
                        self = <type 'instance'> <spacewalk.server.apacheRequest.apachePOST instance at 0x7f3644d0b3b0>
              force_rollback = <type 'int'> 1
                      method = <type 'unicode'> registration.get_possible_orgs
                     exctype = <type 'type'> <class 'spacewalk.server.apacheRequest.UnknownXML'>
                      params = <type 'tuple'> ('sdthzdthz233drgdth', 'ztedhzdth2zdbz')
                      e_type = <type 'type'> <class 'spacewalk.server.apacheRequest.UnknownXML'>
                     e_value = <class 'spacewalk.server.apacheRequest.UnknownXML'> Invalid request received (function: registration.get_possible_orgs invalid).
                    response = <class 'xmlrpclib.Fault'> <Fault -1: u"While running 'registration.get_possible_orgs': caught\n<class 'spacewalk.server.apacheRequest.UnknownXML'> : Invalid request received (function: registration.get_possible_orgs invalid).\n">

Frame process in /usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py at line 517
                          fd = <type 'instance'> <cStringIO.StringO object at 0x7f3644ff0f48>
                       _body = <type 'str'> <?xml version='1.0'?>

Requesting review to revert back the cherry pick in Satellite codebase.

Comment 2 Tomáš Kašpárek 2017-05-15 09:19:01 UTC
I am completely OK with reverting said commit, but I'd like to see a reproducer steps so I (and our QE) can properly test this change.

I've tried rhnreg_ks --serverUrl=http://vega15.qa.lab.tlv.redhat.com/XMLRPC --username=admin --password=*****
also: rhnreg_ks --serverUrl=http://vega15.qa.lab.tlv.redhat.com/XMLRPC --username=admin --password=***** --use-eus-channel --force
also: rhnreg_ks --serverUrl=http://vega15.qa.lab.tlv.redhat.com/XMLRPC --activationkey=1-tkasparek --force

cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.11 (Tikanga)

But no traceback.
Shanon, can you please provide me steps to reproduce?

Comment 4 Tomáš Kašpárek 2017-05-15 14:14:32 UTC
spacewalk.git(master): c37dde2e39e576cb6fe07fd0133acad2caab098a

Comment 7 Radovan Drazny 2017-05-22 13:49:10 UTC
Reproduced on spacewalk-backend-2.5.3-123. When registering RHEL 5 server to Satellite using rhn_registration, there is error message "The server you are attempting to register against does not support this version of the client" and  error in logs:

<...>
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py", line 134, in call_function
    func = self.method_ref(method)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py", line 483, in method_ref
    raise UnknownXML("function: %s invalid" % (method,))
UnknownXML: Invalid request received (function: registration.get_possible_orgs invalid).
<...>

After updating to spacewalk-backend-2.5.3-133 the registration is successful, no error message, no error in logs, system is present in the Satellite.