euca2ools does not correctly specify port when $http_proxy is set

Bug #519567 reported by Robert Collins on 2010-02-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
euca2ools
Invalid
Undecided
Mitch Garnaat
euca2ools (Ubuntu)
Low
Unassigned
python-boto (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: euca2ools

when http_proxy is set, euca2ools commands send the request via the proxy. However they do not set the port header, and as a result the proxy will forward the request to port 80, not port 8773. The symptom of this is:
$ euca-describe-volumes
Warning: failed to parse error message from AWS: <unknown>:1:49: syntax error
Traceback (most recent call last):
  File "/usr/bin/euca-describe-volumes", line 114, in <module>
    main()
  File "/usr/bin/euca-describe-volumes", line 110, in main
    euca.display_error_and_exit('%s' % ex)
  File "/usr/lib/python2.6/dist-packages/euca2ools/__init__.py", line 996, in display_error_and_exit
    dom = minidom.parseString(msg)
  File "/usr/lib/python2.6/xml/dom/minidom.py", line 1928, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: syntax error: line 1, column 49

euca2ools could correct this by either using CONNECT when a proxy is set and a ssl session is desired, passing the port when a proxy is set and no ssl session is desired, or by forcing http_proxy off for all their commands (but this may prevent them working behind a firewall).

ProblemType: Bug
Architecture: amd64
Date: Wed Feb 10 10:56:00 2010
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: euca2ools 1.0+bzr20091007-0ubuntu1.1
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: euca2ools
Uname: Linux 2.6.31-14-generic x86_64

Robert Collins (lifeless) wrote :
Thierry Carrez (ttx) on 2010-02-11
Changed in euca2ools (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Neil Soman (neilsoman) wrote :

I suspect this is something that will need to be patched against boto, not euca2ools, since boto handles the actual http connection.

Changed in eucalyptus:
status: New → Confirmed
status: Confirmed → Triaged
Changed in python-boto (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Neil Soman (neilsoman) on 2010-10-12
Changed in eucalyptus:
status: Triaged → In Progress
status: In Progress → Confirmed
assignee: nobody → Mitch Garnaat (mitch-garnaat)
Scott Moser (smoser) on 2011-02-25
affects: eucalyptus → euca2ools
Changed in euca2ools:
status: Confirmed → Invalid
Scott Moser (smoser) on 2014-07-29
Changed in python-boto (Ubuntu):
status: Confirmed → Fix Released
Changed in euca2ools (Ubuntu):
status: Confirmed → Fix Released
Changed in python-boto (Ubuntu):
status: Fix Released → Incomplete
Scott Moser (smoser) wrote :

This is odd.

$ https_proxy=http://bogus:9999/ http_proxy=http://bogus:9999/ euca-describe-images

that seems to work fine.
it seems that euca-describe-images completely ignores http_proxy and https_proxy.

$ dpkg-query --show euca2ools
euca2ools 3.0.2-1ubuntu1

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers