Bug 855992

Summary: rhn-channel --available-channels ignores proxy configuration
Product: [Community] Spacewalk Reporter: Stephen Herr <sherr>
Component: ClientsAssignee: Stephen Herr <sherr>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.8CC: ahumbe, cperry, dswegen, jhutar
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhn-client-tools-1.8.23-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 815695 Environment:
Last Closed: 2012-11-01 16:19:51 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: 815695    
Bug Blocks: 871344    

Description Stephen Herr 2012-09-10 21:16:48 UTC
+++ This bug was initially created as a clone of Bug #815695 +++

Description of problem:

If running rhn-channel with the --available-channels option any defined proxy gets ignored.

"rhn --list" however does respect a defined proxy, for example.

Version-Release number of selected component (if applicable):

rhn-setup-1.0.0-73.el6.noarch

How reproducible:

Every time

Steps to Reproduce:
1. Disable name resolution in /etc/resolv.conf
2. Set enableProxy and set proxy config (using IP address) in /etc/sysconfig/rhn/up2date
3. Run rhn-channel --available-channels
  
Actual results:

The following python backtrace is produced:

[root@luci ~]# rhn-channel --available-channels
Username: 
Password:

Traceback (most recent call last):
  File "/usr/sbin/rhn-channel", line 157, in <module>
    main()
  File "/usr/sbin/rhn-channel", line 149, in main
    channels = get_available_channels(OPTIONS.user, OPTIONS.password)
  File "/usr/sbin/rhn-channel", line 95, in get_available_channels
    key = client.auth.login(user, password)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1235, in request
    self.send_content(h, request_body)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1349, in send_content
    connection.endheaders()
  File "/usr/lib64/python2.6/httplib.py", line 904, in endheaders
    self._send_output()
  File "/usr/lib64/python2.6/httplib.py", line 776, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.6/httplib.py", line 735, in send
    self.connect()
  File "/usr/lib64/python2.6/httplib.py", line 1108, in connect
    sock = socket.create_connection((self.host, self.port), self.timeout)
  File "/usr/lib64/python2.6/socket.py", line 500, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -3] Temporary failure in name resolution

Run "rhn-channel --list" with the same configuration and it returns the expected output.

Expected results:

The normal output from rhn-channel --available-channels.


Additional info:

Doing a tcpdump when running --available-channels clearly shows it doing a dns lookup for xmlrpc.rhn.redhat.com, whereas for --list it does an HTTP request to the defined proxy directly.

Comment 1 Stephen Herr 2012-09-10 21:20:36 UTC
Spacewalk master: b592a185761bb3308e628bc5be408220e02324d9

Comment 2 Stephen Herr 2012-09-27 19:14:09 UTC
and 5056468dd3f3674fba955a36467a1f0b057f8604

Comment 3 Jan Pazdziora 2012-10-30 19:24:31 UTC
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/

Comment 4 Jan Pazdziora 2012-11-01 16:19:51 UTC
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18