OpenStack Compute (Nova)

nova-network doesn't re-assign Floating Ips if they have been used.

Asked by Warik on 2012-05-22

Hello Stackers!

Well, it's pretty all in the subject. I have a cluster of 3 servers (1 controller and 2 computes) under Precise and Essex packages (2012.1-0ubuntu2.1)

I am using the FlatDHCP network to give away private IPs. I used to have a private network for the instances.

Recently, I changed this private network to use the option "multi_host" as a HA solution. It works fine. But I found out that since this change, when a Floating IPs in my pool is assigned to an instance (via auto_assign_floating_ip=True in nova.conf) if I terminate the instance the Floating IP get un-assigned to the instance but this IP will not be re-assign to another instance, ever.

I was wondering if there is a way to resolved that problem.

Thanks a lot!

Question information

Language:
English Edit question
Status:
Expired
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
2012-06-07
Last reply:
2012-06-23
Warik (warik) said : #1

Hello,

Any updates on that one?

Thanks

I've got the same thing here, when looking at the nova DB the floating_ips table shows that although the floating ip is correctly diassociated from an instance it is still allocated to the project and will not be reused even if you spawn a VM in this same project.

If I manually set the project_id to NULL for this floating ip, it will be re-used when spawning a new VM.

The problem seems to be that the floating_ip gets correctly disassociated from the fixed_ip (and the instance) but does not ALWAYS get correctly deallocated from the project.

A test I did was:

1. starting from an empty DB
2. spawn 10 instances with auto_assign_floating_ips=True and multi_host=True (2 compute nodes)
3. the floating_ips table reflects the 10 floating ips assigned to the project and associated to the fixed_ips
4. terminate all VMs
5. I end up with 3 floating ips not correctly deallocated: they still have project_id and to_assigned set while the 7 correctly released floating_ips have NULL and '0'.

Those 3 floatings will never be re-associated to an instance.

Boris

Warik (warik) said : #3

Hello Boris,

Thanks for your answer, we both have the same problem and found the same cause by looking at the nova DB.

I would like to add something here, do you have the same problem with the fixed IPs ? I have the exact same behavior between the Floating Ips and the Fixed IPs... here in an output:

//////////
nova-manage fixed list
WARNING: fixed ip 172.16.1.2 allocated to missing instance /We can see here the problem...
172.16.1.0/22 172.16.1.3 VM3 nova-compute1
//////////

Let me know if you are experiencing the same behavior as well :)

Anyone know a fix to that issue?

Thanks

Warik (warik) said : #4

Hello,

Is this problem related to the current package version ?

Launchpad Janitor (janitor) said : #5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Warik (warik) said : #6

Hi,

I am still wondering if someone could explain this to me. Or maybe giving me a clue on how to fix this problem?
Thanks

Launchpad Janitor (janitor) said : #7

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Ray (xiaoquqi) said : #8

I think this is related to your bug, seems they fixed on the master, but not in essex.

Ray (xiaoquqi) said : #9
Warik (warik) said : #10

Do you know if I copy the code from the master branch to my Essex environment it will work?