EC2 API AssociateAddress not compliant on addresses already in use

Bug #1004860 reported by Jan Van Winkel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
John Tran

Bug Description

In case a floating ip address is associated with a new instance via EC2 API call (AssociateAddress) and the address was already in use by another instance an exception is raised in the EC2 API and a error is returned to the caller of the API.

According to EC2 API Documentation this should not be the case and the address should be assigned to the new instance:
"""
For EC2 addresses: This action associates an Elastic IP address with an instance (not running in a VPC). If the IP address is currently assigned to another instance, the IP address is assigned to the new instance. For more information about EC2 Elastic IP addresses, go to Instance Addressing in the Amazon Elastic Compute Cloud User Guide.
"""

VERSION INFO:
Essex ubuntu package nova-api 2012.1-0ubuntu2

TRACES:

(nova.api.ec2): 2012-05-26 13:17:57,379 ERROR Unexpected error raised: Remote error: FloatingIpAssociated Floating ip 172.31.237.80 is associated.
[u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 252, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', u' File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 258, in wrapped\n return func(self, context, *args, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 453, in associate_floating_ip\n raise exception.FloatingIpAssociated(address=floating_address)\n', u'FloatingIpAssociated: Floating ip 172.31.237.80 is associated.\n'].
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py", line 582, in __call__
    result = api_request.invoke(context)
  File "/usr/lib/python2.7/dist-packages/nova/api/ec2/apirequest.py", line 81, in invoke
    result = method(context, **args)
  File "/usr/lib/python2.7/dist-packages/nova/api/ec2/cloud.py", line 1291, in associate_address
    address=public_ip)
  File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 100, in wrapped
    return func(self, context, target, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 1638, in associate_floating_ip
    floating_address=address, fixed_address=ips[0]['address'])
  File "/usr/lib/python2.7/dist-packages/nova/network/api.py", line 146, in associate_floating_ip
    'affect_auto_assigned': affect_auto_assigned}})
  File "/usr/lib/python2.7/dist-packages/nova/rpc/__init__.py", line 68, in call
    return _get_impl().call(context, topic, msg, timeout)
  File "/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py", line 674, in call
    return rpc_amqp.call(context, topic, msg, timeout, Connection.pool)
  File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 338, in call
    rv = list(rv)
  File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 306, in __iter__
    raise result
RemoteError: Remote error: FloatingIpAssociated Floating ip 172.31.237.80 is associated.

Tags: ec2
Chuck Short (zulcss)
tags: added: ec2
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
John Tran (jtran)
Changed in nova:
assignee: nobody → John Tran (jtran)
Revision history for this message
John Tran (jtran) wrote :
Revision history for this message
Joe Gordon (jogo) wrote :

The above patch was merged. But had the wrong Bug# so this bug did not get updated properly.

Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-rc1 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.