Comment 16 for bug 1172808

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/49455
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2
Submitter: Jenkins
Branch: master

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.

    Refs bug: 1172808

    Change-Id: Iaaee059a6746fad68049712f94b2f8cfea6ab8dc