Hi Vedamurthy,
This is surprising.
Following is my investigation on this issue,
* When we try to create an instance for the second time, nova validates
the network setting to check if there is already a port with the same
network settings request (please refer to
$NOVA_SRC/nova/network/neutronv2/api.py - API.validate_networks()).
* If you can see validate_networks() method, there will be a call to
list_ports with a fixed-ip filter
* Since the port_list function in vnc_openstack/neutron_plugin_db.py
<https://review.opencontrail.org/#/c/2916/1/src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py>
does not have a filter for fixed-ips, it returns the entire list of
ports (basically the port created for the first instance)
* But when nova sees that list_ports with fixed-ips filter is not empty,
it throws an exception.FixedIpAlreadyInUse.
I don't understand how it worked for you. If possible, can you please
check if you have the same code-flow? My nova code is somewhat old (the
last commit was on Aug 8), but my contrail code is somewhat latest (Aug
28).
Hi Vedamurthy, nova/network/ neutronv2/ api.py - API.validate_ networks( )). neutron_ plugin_ db.py /review. opencontrail. org/#/c/ 2916/1/ src/config/ vnc_openstack/ vnc_openstack/ neutron_ plugin_ db.py> FixedIpAlreadyI nUse.
This is surprising.
Following is my investigation on this issue,
* When we try to create an instance for the second time, nova validates
the network setting to check if there is already a port with the same
network settings request (please refer to
$NOVA_SRC/
* If you can see validate_networks() method, there will be a call to
list_ports with a fixed-ip filter
* Since the port_list function in vnc_openstack/
<https:/
does not have a filter for fixed-ips, it returns the entire list of
ports (basically the port created for the first instance)
* But when nova sees that list_ports with fixed-ips filter is not empty,
it throws an exception.
I don't understand how it worked for you. If possible, can you please
check if you have the same code-flow? My nova code is somewhat old (the
last commit was on Aug 8), but my contrail code is somewhat latest (Aug
28).
You can also check my patch https:/ /review. opencontrail. org/#/c/ 2916/
which attempts to fix this bug.
Thank you,
Babu
On Thursday 18 September 2014 11:30 PM, Vedamurthy Joshi wrote: 4b6eab13- 69f3-408e- 8cfc-0a19802d9d 92 test_vm1 ( creates 20.1.1.2) 4b6eab13- 69f3-408e- 8cfc-0a19802d9d 92,v4-fixed- ip=20.1. 1.10 test_vm2 0a8d-48b9- b797-02ff21c351 49 | test_vm1 | ACTIVE | None | Running | test-net=20.1.1.2 | bdf2-41c2- b782-90353e271b e8 | test_vm2 | ACTIVE | None | Running | test-net=20.1.1.10 |
> Babu,
> This is what i tried. But it seemed to get created fine. Am i missing anything ?
>
> neutron net-create test-net
> neutron subnet-create test-net 20.1.1.0/24
> nova boot --flavor 2 --image $image_id --nic net-id=
> nova boot --flavor 2 --image $image_id --nic net-id=
>
> root@nodec22:~# nova list |grep test-net
> | 01cfb703-
> | 466fc134-
> root@nodec22:~#
>