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.
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. openstack/ compute/ contrib/ used_limits. py: get_project_ quotas( context, project_id, usages=True) sUsed. 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 totalFloatingIp sUsed parameter. floating_ ip_quota( )
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/
quotas = QUOTAS.
This is not correct behavior for parameters like totalFloatingIp
Interface class NetworkAPI(
To return of maxTotalFloatingIps parameter I suppose additional method should be added in NetworkAPI class. Something like
get_
This method should be implemented for nova-network and for neutron.