Bug 482831 - (proxy-akamai) send X-RHN-Transport-Capability of the proxy's rhnlib, not the clients
send X-RHN-Transport-Capability of the proxy's rhnlib, not the clients
Status: CLOSED ERRATA
Product: Red Hat Satellite Proxy 5
Classification: Red Hat
Component: Server (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Miroslav Suchý
Jiri Kastner
:
Depends On:
Blocks: 488328
  Show dependency treegraph
 
Reported: 2009-01-28 09:22 EST by James Bowes
Modified: 2013-01-10 05:01 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 499723 (view as bug list)
Environment:
Last Closed: 2010-05-03 06:33:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Bowes 2009-01-28 09:22:40 EST
When proxy forwards a request to hosted, it passes along the clients http headers, which is generally good, but for X-RHN-Transport-Properties, we want those that the proxy supports (for http redirect support), not those of the client.
Comment 1 Miroslav Suchý 2009-01-28 09:37:37 EST
The header is actually X-RHN-Transport-Capability.
Comment 2 Miroslav Suchý 2009-01-28 10:22:53 EST
[15:54] <msuchy> jbowes: if I understand it correctly I should set X-RHN-Transport-Capability to follow-redirects=2,  and nothing else (since proxy already understood redirects) to implement? Correct?
[15:54] <jbowes> msuchy: the version should be 3, since 2 was for the last implementation

So we should add to rhnBroker:
self._transport.add_header("X-RHN-Transport-Capability",
                    "follow-redirects=3")

I wonder if broker is enough or I should add it to rhnRedirect as well...

Additionally the proxy will give this TB when redirecting:

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/proxy/apacheServer.py", line 55, in __call__
    ret = f(req)
  File "/usr/share/rhn/proxy/apacheHandler.py", line 337, in handler
    ret = handlerObj.handler()
  File "/usr/share/rhn/proxy/redirect/rhnRedirect.py", line 83, in handler
    status = self._serverCommo(self.req.read())       # part 2
  File "/usr/share/rhn/proxy/rhnShared.py", line 207, in _serverCommo
    return self._handleServerResponse(status)
  File "/usr/share/rhn/proxy/redirect/rhnRedirect.py", line 127, in _handleServerResponse
    redirectStatus = self.__redirectToNextLocation()
  File "/usr/share/rhn/proxy/redirect/rhnRedirect.py", line 212, in __redirectToNextLocation
    redirectStatus = self.__redirectToNextLocationNoRetry(loopProtection)
  File "/usr/share/rhn/proxy/redirect/rhnRedirect.py", line 309, in __redirectToNextLocationNoRetry
    connection.connect()
  File "/usr/lib/python2.4/site-packages/rhn/connections.py", line 193, in connect
    sock.connect((self.host, self.port))
  File "<string>", line 1, in connect
TypeError: an integer is required

and values are:
Frame connect in <string> at line 1
	                self = <class 'socket._socketobject'> <socket._socketobject object at 0xb7d1635c>
	                args = <type 'tuple'> (('content-xml.rhn.webdev.redhat.com', '2443'),)

The port is expecting to be number not string.
 s/splitport/splitnport/ in rhnShared should fix this issue.
Comment 3 Miroslav Suchý 2009-01-29 11:26:06 EST
Commited as f8b7351ca077bf64df4ef54783e16dfa3e5947f4
Comment 4 Clifford Perry 2009-02-05 11:40:20 EST
Keeping MODIFIED pending final confirmation on Akamai roll-out.
Comment 5 Miroslav Suchý 2009-02-16 05:08:16 EST
Mass moving ON_QA
Comment 6 Brandon Perkins 2009-02-16 16:21:25 EST
Keeping MODIFIED pending final confirmation on Akamai roll-out.
Comment 9 Miroslav Suchý 2009-04-06 08:23:39 EDT
Test plan:
1. Make sure that Akamai support is switched on on hosted (F-Akamain on webqa, real Akamai on stage)
2. register Satellite Proxy to hosted
3. register client to Satellite Proxy from step 2
4. confirm, that you are able to install package(s) on client from step 3
Comment 11 Miroslav Suchý 2009-05-04 08:02:51 EDT
OK. The flag follow-redirects has been removed by commit
657f2ae9b112c396f86baecf125f4ee43b36a635
Comment 12 Miroslav Suchý 2010-01-05 05:43:47 EST
The flag was removed only in vader branch. Not in master, so it should be set up and working in recent versions. I.e in 
spacewalk-proxy-0.7.2-1 and in spacewalk-proxy-0.8.1-1 as well.
Comment 15 errata-xmlrpc 2010-05-03 06:33:18 EDT
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/RHEA-2010-0387.html

Note You need to log in before you can comment on or make changes to this bug.