Comment 30 for bug 1249065

Revision history for this message
Alex Xu (xuhj) wrote : Re: Nova throws 400 when attempting to add floating ip (No nw_info cache associated with instance)

I dig into this case http://logs.openstack.org/18/170118/5/check/check-tempest-dsvm-multinode-full/5f871c2/logs/screen-n-net.txt.gz#_2015-04-24_09_30_55_207

I think there is race between allocate fixed ip for instance and the dhcpbridge script.

The fixed ip allocation begin from here

2015-04-24 09:30:55.055 DEBUG nova.network.manager [req-543f9791-de80-40e3-90af-90a8ff30bb40 TestShelveInstance-2072004359 TestShelveInstance-310454229] [instance: c0d42ce0-c38d-4ed3-ad05-352c57ae96e5] Networks retrieved for instance: |[{'bridge': u'br100', 'multi_host': True, 'should_create_bridge': True, 'bridge_interface': u'br_flat', 'tenant_id': None, 'label': u'private', 'id': 'f17001ac-a843-4bc3-923f-44f9800f7aaf'}]| allocate_for_instance /opt/stack/new/nova/nova/network/manager.py:486

And end at here:
2015-04-24 09:30:55.396 DEBUG nova.network.manager [req-543f9791-de80-40e3-90af-90a8ff30bb40 TestShelveInstance-2072004359 TestShelveInstance-310454229] Built network info: |[]| get_instance_nw_info /opt/stack/new/nova/nova/network/manager.py:650

The end show the network info is empty. But there isn't any error at here. So the problem is the fixed ip allocated, but at the end it's disapeared.

And there is log between the beginning and the end:
2015-04-24 09:30:55.207 DEBUG nova.network.manager [req-36fe2852-902d-48b0-935f-f75f7ca68b37 None None] Released IP |10.1.0.7| release_fixed_ip

This 'release_fixed_ip' is only can be triggered by dhcpbridge script
https://github.com/openstack/nova/blob/master/nova/cmd/dhcpbridge.py#L67

The dhcpbridge script will called by dnsmasq.

So the thing is when the middle of allocated ip, the dhcpbridge release same ip which used by previous instance at same time.