Comment 13 for bug 1713724

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/pike)

Reviewed: https://review.openstack.org/534348
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2c4c4aa77a092d673f90ea5e73599fc43b6ec7be
Submitter: Zuul
Branch: stable/pike

commit 2c4c4aa77a092d673f90ea5e73599fc43b6ec7be
Author: David Lyle <email address hidden>
Date: Fri Oct 6 10:44:03 2017 -0600

    Correct quota usage check for instances

    Previously, updating the quota value for instance on a project that
    the user was not currently scoped to would validate the new quota
    value by comparing with the usage of the currently scoped project.
    The cause of this error was an incorrect use of the server list
    parameters.

    According to the comment in nova source:
    https://github.com/openstack/nova/blob/d43d1d673403c1bf9e2ffd94d7a711956a3506de/nova/api/openstack/compute/servers.py#L277-L280
    and the comments in this bug:
    https://bugs.launchpad.net/nova/+bug/1185290

    indicate that the tenant_id or project_id flag cannot be used without
    the --all-tenants flag.

    The fix involves passing the --all-tenants flag when querying instance usage
    for any project the user is not currently scoped to. It also removes the
    passing of the tenant_id flag when querying the current project.

    Tests were also updated to match the new behavior by not passing the
    tenant_id to the API call to list servers where the target project is
    the currently scoped project.

    Change-Id: Iee06bc1c8ccd50f595f4cb274f956c13495c8494
    Closes-Bug: #1713724
    (cherry picked from commit 33dc94079cc25128998d2f339e664a775ce82396)