Comment 1 for bug 1376462

Revision history for this message
Zhenzan Zhou (zhenzan-zhou) wrote :

Current nova_driver uses Nova API '/v2/<id>//os-floating-ips' without enabling all_tenants. And this API seems to not populate floating ips which are already attached to instances. E.g.

stack@stack-cnt11:~/workspace/python-congressclient$ nova floating-ip-list
+----+-----------+----------+------+
| Ip | Server Id | Fixed Ip | Pool |
+----+-----------+----------+------+
+----+-----------+----------+------+
stack@stack-cnt11:~/workspace/python-congressclient$ nova floating-ip-list --all-tenants
+----+-----------+----------+------+
| Ip | Server Id | Fixed Ip | Pool |
+----+-----------+----------+------+
+----+-----------+----------+------+
stack@stack-cnt11:~/workspace/python-congressclient$ neutron floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 7a0d6c41-3b8a-40e8-af80-ec08037742bc | 172.16.0.6 | 192.0.2.46 | dc3f3c75-c741-43cb-9dfa-1859c61b10ab |
+--------------------------------------+------------------+---------------------+--------------------------------------+
stack@stack-cnt11:~/workspace/python-congressclient$ nova floating-ip-create
+------------+-----------+----------+---------+
| Ip | Server Id | Fixed Ip | Pool |
+------------+-----------+----------+---------+
| 192.0.2.48 | - | - | ext-net |
+------------+-----------+----------+---------+
stack@stack-cnt11:~/workspace/python-congressclient$ nova floating-ip-list
+------------+-----------+----------+---------+
| Ip | Server Id | Fixed Ip | Pool |
+------------+-----------+----------+---------+
| 192.0.2.48 | - | - | ext-net |
+------------+-----------+----------+---------+
stack@stack-cnt11:~/workspace/python-congressclient$ nova floating-ip-list --all-tenants
+------------+-----------+----------+---------+
| Ip | Server Id | Fixed Ip | Pool |
+------------+-----------+----------+---------+
| 192.0.2.48 | - | - | ext-net |

After I created a new floating ip, I can see it's populated:

stack@stack-cnt11:~/workspace/python-congressclient$ openstack congress datasource row list nova floating_IPs
+----------+--------------------------------------+------------+---------+---------+
| fixed_ip | id | ip | host_id | pool |
+----------+--------------------------------------+------------+---------+---------+
| None | 2a694a76-f684-4a1d-be0b-d36cdc10488f | 192.0.2.48 | None | ext-net |
+----------+--------------------------------------+------------+---------+---------+