Comment 4 for bug 1376316

Revision history for this message
Marian Horban (mhorban) wrote :

The root cause of this problem is that we have different quota drivers for nova and for neutron. These quota drivers could use different DB tables.
When we run command
    nova absolute-limits
nova uses it own quota driver. But when we allocate floating ip neutron's quota driver is used to decide if quota is exceeded.
Right now in nova we using nova quota driver directly nova/api/openstack/compute/contrib/used_limits.py:
    quotas = QUOTAS.get_project_quotas(context, project_id, usages=True)
This is not correct behavior for parameters like totalFloatingIpsUsed.
Interface class NetworkAPI(nova/network/base_api.py) should be used to get info about network configuration. Method NetworkAPI::get_floating_ips_by_project() clould be used to get totalFloatingIpsUsed parameter.
To return of maxTotalFloatingIps parameter I suppose additional method should be added in NetworkAPI class. Something like
    get_floating_ip_quota()
This method should be implemented for nova-network and for neutron.