Public bug reported: When nova use neutron as network-api, it will check neutron port quota in nova-api if we boot a instance with parameter network-id. In large-scale, if a tenant already has a large number instances, booting a instance needs much time to get used port number and check port quota through neutron API, sometimes the REST api will timeout and fail to create instance. we can see the spec in Nova[1]
from nova side:[2] Ideally Nova would create all required ports as part of network validation, but port creation requires some details from the hypervisor. So we just check the quota and return how many of the requested number of instances can be created from neutron side: it does not provide reservation mechanism, if nova wants to check the rest of port number for this tenant, nova must use neutron quota-show to get port quota, and use port-list to get already created port numbers, and then get the rest number, in large-scale, port-list will consume much time. And it will return a very big body maybe contain thousands port info. For this issue, we propose to add a left resource-count API based on quota, if it done, we could remove port-quota check in nova. We could propose 2 ways: 1. query resource_count specified tenant_id and resource_type, it will return the left resource count specified of this tenant. 2. query all resource_counts specified tenant_id, it will return all the left resource counts of this tenant. [1]https://review.openstack.org/#/c/250993/ [2]https://github.com/openstack/nova/blob/12.0.0/nova/network/neutronv2/api.py#L1178 ** Affects: neutron Importance: Undecided Assignee: zhaobo (zhaobo6) Status: New ** Changed in: neutron Assignee: (unassigned) => zhaobo (zhaobo6) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1556786 Title: [RFE]Don't check port quota in nova-api Status in neutron: New Bug description: When nova use neutron as network-api, it will check neutron port quota in nova-api if we boot a instance with parameter network-id. In large-scale, if a tenant already has a large number instances, booting a instance needs much time to get used port number and check port quota through neutron API, sometimes the REST api will timeout and fail to create instance. we can see the spec in Nova[1] from nova side:[2] Ideally Nova would create all required ports as part of network validation, but port creation requires some details from the hypervisor. So we just check the quota and return how many of the requested number of instances can be created from neutron side: it does not provide reservation mechanism, if nova wants to check the rest of port number for this tenant, nova must use neutron quota-show to get port quota, and use port-list to get already created port numbers, and then get the rest number, in large-scale, port-list will consume much time. And it will return a very big body maybe contain thousands port info. For this issue, we propose to add a left resource-count API based on quota, if it done, we could remove port-quota check in nova. We could propose 2 ways: 1. query resource_count specified tenant_id and resource_type, it will return the left resource count specified of this tenant. 2. query all resource_counts specified tenant_id, it will return all the left resource counts of this tenant. [1]https://review.openstack.org/#/c/250993/ [2]https://github.com/openstack/nova/blob/12.0.0/nova/network/neutronv2/api.py#L1178 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1556786/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp