Bug 1003093 - boto allocate_address() allocates public IP address, put returns 'None' for Address.public_ip
boto allocate_address() allocates public IP address, put returns 'None' for A...
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora EPEL
Classification: Fedora
Component: python-boto (Show other bugs)
el6
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Robert Scheck
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-30 14:30 EDT by apb18
Modified: 2013-09-26 19:11 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-26 19:11:40 EDT
Type: Bug
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 apb18 2013-08-30 14:30:54 EDT
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 13:19:37 EDT
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 19:11:40 EDT
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.