Bug 1003093 - boto allocate_address() allocates public IP address, put returns 'None' for Address.public_ip
Summary: boto allocate_address() allocates public IP address, put returns 'None' for A...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-boto
Version: el6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-30 18:30 UTC by apb18
Modified: 2013-09-26 23:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-26 23:11:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description apb18 2013-08-30 18:30:54 UTC
Description of problem:
boto.ec2.connection.allocate_address() is supposed to return an Address object that is populated with the IP addresses allocated.  In this case, I was trying to allocate an address from an ec2 connection to Eucalyptus.  It worked fine with version python-boto 2.5.2-3.  A recent update to 2.9.9-2 seems to display broken behaviour.  

After allocating an address via allocate_address() in using 2.9.9-2, the resulting Address object has 'None' for public_ip.  It looks like the call to Eucalyptus is actually successful, but the result is not being populated to the .public_ip attribute in the Address object returned to the user.  Everything works fine with the older 2.5.2-3 version

Version-Release number of selected component (if applicable):
python-boto-2.9.9-2.el6.noarch


How reproducible:
Allocate an address via boto.ec2.connection.allocate_address()


Steps to Reproduce:
1. Create an EC2 connection to a Eucalyptus service
2. Try to allocate an address via boto.ec2.connection.allocate_address()
3. Notice that the address has None for public_ip, even though the address was successfully allocated

Actual results:
# ec2 is open connection of type boto.ec2.connection
>>> addr = ec2.allocate_address()
>>> addr
Address:None
>>> print addr.public_ip
None

euca-describe-addresses shows that this actually did successfully allocate address in Eucalyptus.  That address just isn't returned



Expected results:
# ec2 is open connection of type boto.ec2.connection
>>> addr = ec2.allocate_address()
>>> addr
Address:123.45.67.89
>>> print addr.public_ip
123.45.67.89

Comment 1 Garrett Holmstrom 2013-09-05 17:19:37 UTC
With what version of eucalyptus did you notice this behavior?  Older versions like to mangle the XML they return when they receive requests with API versions newer than they understand, so that may be throwing boto's parsing off.

Comment 2 Garrett Holmstrom 2013-09-26 23:11:40 UTC
This seems to work for me, at least with eucalyptus 3.3.1.  If you need a patch to make things work with an older cloud please re-open this bug and include the debug output you get when you run boto.set_stream_logger("") and then the method that is failing.  That will hopefully provide enough info about what the server is replying with to work out exactly what is breaking things for you.


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