commit 1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2
Author: Phil Day <email address hidden>
Date: Wed Oct 2 23:14:35 2013 +0000
Check Neutron port quota during validate_networks in API
Unless ports are passed into Nova it will create ports on the
requested networks as part of the network allocation in
the compute manager. However if the user exceeds their
port quota the instance will end up in an Error state, having
first been re-scheduled a number of times.
It would be much better if the quota failure was detected as
part of the network validation in the API server, so that an
error can be reported to the user and the creation failed.
A full fix would include reserving or creating the ports at
this stage, but there is no reservation mechanism in the
Neutron API, and port creation depends in some cases
on mac addresses only available on the compute manager.
Instead this change just validates the quota and adjusts the
max_count to be consistent with that quota, which doesn't
guarantee that the create will work, but does catch the
majority of cases.
Reviewed: https:/ /review. openstack. org/49455 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=1d9a0a620d7 8ab54f7a3da61b8 03a97cdbdd01f2
Committed: https:/
Submitter: Jenkins
Branch: master
commit 1d9a0a620d78ab5 4f7a3da61b803a9 7cdbdd01f2
Author: Phil Day <email address hidden>
Date: Wed Oct 2 23:14:35 2013 +0000
Check Neutron port quota during validate_networks in API
Unless ports are passed into Nova it will create ports on the
requested networks as part of the network allocation in
the compute manager. However if the user exceeds their
port quota the instance will end up in an Error state, having
first been re-scheduled a number of times.
It would be much better if the quota failure was detected as
part of the network validation in the API server, so that an
error can be reported to the user and the creation failed.
A full fix would include reserving or creating the ports at
this stage, but there is no reservation mechanism in the
Neutron API, and port creation depends in some cases
on mac addresses only available on the compute manager.
Instead this change just validates the quota and adjusts the
max_count to be consistent with that quota, which doesn't
guarantee that the create will work, but does catch the
majority of cases.
Refs bug: 1172808
Change-Id: Iaaee059a6746fa d68049712f94b2f 8cfea6ab8dc