Bug 855992 - rhn-channel --available-channels ignores proxy configuration
rhn-channel --available-channels ignores proxy configuration
Product: Spacewalk
Classification: Community
Component: Clients (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Stephen Herr
Red Hat Satellite QA List
Depends On: 815695
Blocks: space18
  Show dependency treegraph
Reported: 2012-09-10 17:16 EDT by Stephen Herr
Modified: 2012-11-01 12:19 EDT (History)
4 users (show)

See Also:
Fixed In Version: rhn-client-tools-1.8.23-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 815695
Last Closed: 2012-11-01 12:19:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Stephen Herr 2012-09-10 17:16:48 EDT
+++ 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):


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

Traceback (most recent call last):
  File "/usr/sbin/rhn-channel", line 157, in <module>
  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
  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
  File "/usr/lib64/python2.6/httplib.py", line 904, in endheaders
  File "/usr/lib64/python2.6/httplib.py", line 776, in _send_output
  File "/usr/lib64/python2.6/httplib.py", line 735, in send
  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 17:20:36 EDT
Spacewalk master: b592a185761bb3308e628bc5be408220e02324d9
Comment 2 Stephen Herr 2012-09-27 15:14:09 EDT
and 5056468dd3f3674fba955a36467a1f0b057f8604
Comment 3 Jan Pazdziora 2012-10-30 15:24:31 EDT
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 12:19:51 EDT
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18

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