'force' parameter broken in os-quota-sets microversion >= 2.36

Bug #1733886 reported by Matt Riedemann on 2017-11-22
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
High
Matt Riedemann
Newton
High
Matt Riedemann
Ocata
High
Matt Riedemann
Pike
High
Matt Riedemann

Bug Description

The 2.36 microversion broke the 'force' parameter in the os-quota-sets API:

https://developer.openstack.org/api-ref/compute/#update-quotas

It's because for 2.36 the schema redefined the properties but didn't copy the force parameter:

https://github.com/openstack/nova/blob/f69d98ea744bc13189b17ba4c67e4f0279d2f45a/nova/api/openstack/compute/schemas/quota_sets.py#L47

We could fix this as part of blueprint deprecate-file-injection which needs to change the os-quota-sets API to remove the injected_file* parameters, however, after the counting quotas changes in Pike, the 'force' parameter doesn't really mean anything because there are no reserved quotas anymore, so maybe we just document this in the API reference and not try to 'fix it' since the fix wouldn't do anything.

Tags: api Edit Tag help
Matt Riedemann (mriedem) wrote :

Note that 2.36 went into Newton so it does break the 'force' parameter before we made the change for counting quotas in Pike, so effectively newton and ocata are broken for this, and if we were going to fix it with a new microversion, we wouldn't be able to fix it in stable branches anyway since we can't backport a microversion.

So the workaround for people will have to be to force updating quotas using a microversion less than 2.36.

Matt Riedemann (mriedem) wrote :

I guess force means to update quota regardless of usage, so if I have 10 instances and the admin changes quota to 5, they have to force that. The 'reserved' piece would always be 0 starting in Pike, but otherwise the usage part still applies, so we should probably fix this in the 2.56 microversion with the "deprecate-file-injection" blueprint.

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: New → Triaged
importance: Undecided → High
tags: added: api

Fix proposed to branch: master
Review: https://review.openstack.org/523194

Changed in nova:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/523194
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9ddbaa15cb55d1245a8a63d9414d134746fc2f3c
Submitter: Zuul
Branch: master

commit 9ddbaa15cb55d1245a8a63d9414d134746fc2f3c
Author: Matt Riedemann <email address hidden>
Date: Mon Nov 27 13:48:13 2017 -0500

    Fix 'force' parameter in os-quota-sets PUT schema

    A regression was introduced in the 2.36 API microversion where the
    'force' parameter was missing from the 'PUT /os-quota-sets/{tenant_id}'
    API request schema so users could not force quota updates with
    microversion 2.36 or later. The bug is now fixed so that the 'force'
    parameter can once again be specified during quota updates. There is
    no new microversion for this change since it is an admin-only API.

    Change-Id: I947e927802f755ccb25a91efd82cac895779d19e
    Closes-Bug: #1733886

Changed in nova:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/526419
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6f5b3123cc3e35af7d9054c299f4c2232c8c2a3f
Submitter: Zuul
Branch: stable/pike

commit 6f5b3123cc3e35af7d9054c299f4c2232c8c2a3f
Author: Matt Riedemann <email address hidden>
Date: Mon Nov 27 13:48:13 2017 -0500

    Fix 'force' parameter in os-quota-sets PUT schema

    A regression was introduced in the 2.36 API microversion where the
    'force' parameter was missing from the 'PUT /os-quota-sets/{tenant_id}'
    API request schema so users could not force quota updates with
    microversion 2.36 or later. The bug is now fixed so that the 'force'
    parameter can once again be specified during quota updates. There is
    no new microversion for this change since it is an admin-only API.

    Change-Id: I947e927802f755ccb25a91efd82cac895779d19e
    Closes-Bug: #1733886
    (cherry picked from commit 9ddbaa15cb55d1245a8a63d9414d134746fc2f3c)

Reviewed: https://review.openstack.org/526426
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=901377b22bb92747748b25058e31d1099904c8cc
Submitter: Zuul
Branch: stable/ocata

commit 901377b22bb92747748b25058e31d1099904c8cc
Author: Matt Riedemann <email address hidden>
Date: Mon Nov 27 13:48:13 2017 -0500

    Fix 'force' parameter in os-quota-sets PUT schema

    A regression was introduced in the 2.36 API microversion where the
    'force' parameter was missing from the 'PUT /os-quota-sets/{tenant_id}'
    API request schema so users could not force quota updates with
    microversion 2.36 or later. The bug is now fixed so that the 'force'
    parameter can once again be specified during quota updates. There is
    no new microversion for this change since it is an admin-only API.

    Change-Id: I947e927802f755ccb25a91efd82cac895779d19e
    Closes-Bug: #1733886
    (cherry picked from commit 9ddbaa15cb55d1245a8a63d9414d134746fc2f3c)
    (cherry picked from commit 6f5b3123cc3e35af7d9054c299f4c2232c8c2a3f)

Reviewed: https://review.openstack.org/526427
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9de9faa0f6080e0e01e676330eff293c3d15ffb2
Submitter: Zuul
Branch: stable/newton

commit 9de9faa0f6080e0e01e676330eff293c3d15ffb2
Author: Matt Riedemann <email address hidden>
Date: Mon Nov 27 13:48:13 2017 -0500

    Fix 'force' parameter in os-quota-sets PUT schema

    A regression was introduced in the 2.36 API microversion where the
    'force' parameter was missing from the 'PUT /os-quota-sets/{tenant_id}'
    API request schema so users could not force quota updates with
    microversion 2.36 or later. The bug is now fixed so that the 'force'
    parameter can once again be specified during quota updates. There is
    no new microversion for this change since it is an admin-only API.

    Change-Id: I947e927802f755ccb25a91efd82cac895779d19e
    Closes-Bug: #1733886
    (cherry picked from commit 9ddbaa15cb55d1245a8a63d9414d134746fc2f3c)
    (cherry picked from commit 6f5b3123cc3e35af7d9054c299f4c2232c8c2a3f)
    (cherry picked from commit 901377b22bb92747748b25058e31d1099904c8cc)

This issue was fixed in the openstack/nova 16.0.4 release.

Reviewed: https://review.openstack.org/527421
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e6498e6ef13e214b74b76fa57cb3bcb6919c2cf8
Submitter: Zuul
Branch: master

commit e6498e6ef13e214b74b76fa57cb3bcb6919c2cf8
Author: Matt Riedemann <email address hidden>
Date: Tue Dec 12 10:07:28 2017 -0500

    doc: add note about fixing admin-only APIs without a microversion

    This is a follow up to change I947e927802f755ccb25a91efd82cac895779d19e
    to document the decision and agreements made in that change about fixing
    obvious regression bugs in admin-only APIs without a microversion.

    Change-Id: I4051cb465c509db63620ee727654f7c896fab1e8
    Related-Bug: #1733886

This issue was fixed in the openstack/nova 15.1.0 release.

This issue was fixed in the openstack/nova 14.1.0 release.

This issue was fixed in the openstack/nova 17.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers