Quota checks are inconsistent

Bug #1508249 reported by John Griffith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Nate Potter

Bug Description

sometimes we check/set quotas in cinder.volume.api before the schedule call; other times we check it on the other side of the call in cinder.volume.manager

We should probably be consistent with these, and we should probably do these on the API side so we can return a reasonable response to the caller before launching the rpc call.

This is mostly due to blocking vs non-blocking calls but we should take a look at cleaning some of these up. We should be able to always check the reservations in volume.api and then roll-back adjust in the case of failure in the volume.manager if need be.

Changed in cinder:
assignee: nobody → John Griffith (john-griffith)
assignee: John Griffith (john-griffith) → nobody
description: updated
Nate Potter (ntpttr)
Changed in cinder:
assignee: nobody → Nate Potter (ntpttr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Nate Potter (<email address hidden>) on branch: master
Review: https://review.openstack.org/243673
Reason: This patch is being abandoned in favor of multiple smaller patches. The first of these can be found here https://review.openstack.org/#/c/249388/ and I'll post the other on this thread when it's complete.

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Nate Potter (<email address hidden>) on branch: master
Review: https://review.openstack.org/249388
Reason: This change is unnecessary because the exceptions raised by these quota checks are silenced anyways.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Nate Potter (<email address hidden>) on branch: master
Review: https://review.openstack.org/249441
Reason: This change is unnecessary because the exceptions raised are silenced anyways.

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

Reviewed: https://review.openstack.org/254980
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=d78399e614a90b062bcc1ff10aa00a037b158cad
Submitter: Jenkins
Branch: master

commit d78399e614a90b062bcc1ff10aa00a037b158cad
Author: Nate Potter <email address hidden>
Date: Tue Dec 8 22:12:27 2015 +0000

    Move retype quota checks to API

    Currently the retype quota check is done in the manager, where it will
    raise an exception if the check fails. This patch moves the check to the
    API so that the user is given feedback before the RPC cast is made.

    APIImpact
    Closes-bug: #1508249

    Change-Id: Iba24edd8ad824837028353b52c90742df55c9173

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to cinder (master)

Reviewed: https://review.openstack.org/263473
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=3ef58dd656d6fdf08457f16a2a39b0fbffd3c2ca
Submitter: Jenkins
Branch: master

commit 3ef58dd656d6fdf08457f16a2a39b0fbffd3c2ca
Author: Nate Potter <email address hidden>
Date: Mon Jan 4 23:10:19 2016 +0000

    Roll back reservations quota in RPC if necessary

    Currently the latest version of the volume rpcapi passes along
    old_reservations in retype whereas older versions do not. In the
    case where old_reservations aren't passed, they will be checked again
    in c-vol. This patch rolls back the quotas that were checked for
    old_reservations if the client can't send the latest version in
    the RPCAPI so that they aren't reserved twice.

    This is an amendment to this recently merged patch:
    Iba24edd8ad824837028353b52c90742df55c9173

    Closes-Bug: 1546089
    Related-bug: 1508249
    Change-Id: I54b39f367b8552ed5e932c71265432e7cf72c073

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.