cannot create thin provisioned volume larger than free space

Bug #1458976 reported by Patrick East
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Xing Yang
Kilo
Fix Released
Undecided
Unassigned

Bug Description

There is currently a check here https://github.com/openstack/cinder/blob/master/cinder/scheduler/filters/capacity_filter.py#L83 where it will only allow a volume to be placed if the size is less than free space on a backend. After that check it will take into account thin provisioning and allow you to over subscribe.

As an example if you have 100GB of free space you can create as many 99GB volumes as you want (up to the over subscription ratio), but can never create a 101GB volume even if it stays under the oversubscription ratio.

Changed in cinder:
assignee: nobody → Patrick East (patrick-east)
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/185764

Changed in cinder:
assignee: Patrick East (patrick-east) → Xing Yang (xing-yang)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 75953752e41819b0d2ca770d4d13ed1ccaec685a
Author: Xing Yang <email address hidden>
Date: Wed May 27 12:58:04 2015 -0400

    Fix capacity filter to allow oversubscription

    Currently the capacity filter does not allow oversubscrition
    if the free physical capacity is less than the new volume size.
    This was based on the assumption that a new thinly provisioned
    volume will be consumed right away. This assumption does not
    allow us to take full advantage of thin provisioning.

    The fix is to allow oversubscription if thin provisioning is
    supported and max_over_subscription_ratio is greater than or
    equal to 1. The free physical capacity will not be used to
    compare with the new volume size for a backend that supports
    oversubscription in thin provisioning. The oversubscription
    ratio and virtual free capacity will still be used to decide
    whether a backend can be chosen for thin provisioning.

    Closes-Bug: #1458976
    Change-Id: I4c8904445654db839c25ded420915f83c3756f94

Changed in cinder:
status: In Progress → Fix Committed
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/188031

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

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/188037

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

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

commit ab017d98b1bb39d218bd93970c0e561c685b7dbf
Author: Xing Yang <email address hidden>
Date: Wed Jun 3 10:40:26 2015 -0400

    Allow provisioning to reach max oversubscription

    Currently if provisioned ratio is equal to max_over_subscription_ratio,
    the capacity filter does not allow any more thin provisioning. This patch
    makes a change so that thin provisioning is allowed if provisioned ratio
    is equal to max_over_subscription_ratio; it will only stop provisioning
    if provisioned ratio is greater than max_over_subscription_ratio.

    Change-Id: Ibf13ef97472b80a1b59ffd4389a4ed2eacf67205
    Partial-Bug: #1458976

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

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/188403

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

Reviewed: https://review.openstack.org/188037
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=28df54c5d1db9ebb766bd7b81962676c4e591cad
Submitter: Jenkins
Branch: stable/kilo

commit 28df54c5d1db9ebb766bd7b81962676c4e591cad
Author: Xing Yang <email address hidden>
Date: Wed May 27 12:58:04 2015 -0400

    Fix capacity filter to allow oversubscription

    Currently the capacity filter does not allow oversubscrition
    if the free physical capacity is less than the new volume size.
    This was based on the assumption that a new thinly provisioned
    volume will be consumed right away. This assumption does not
    allow us to take full advantage of thin provisioning.

    The fix is to allow oversubscription if thin provisioning is
    supported and max_over_subscription_ratio is greater than or
    equal to 1. The free physical capacity will not be used to
    compare with the new volume size for a backend that supports
    oversubscription in thin provisioning. The oversubscription
    ratio and virtual free capacity will still be used to decide
    whether a backend can be chosen for thin provisioning.

    Closes-Bug: #1458976
    Change-Id: I4c8904445654db839c25ded420915f83c3756f94
    (cherry picked from commit 75953752e41819b0d2ca770d4d13ed1ccaec685a)

tags: added: in-stable-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/188403
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=28bb8d27d57a034f5e9e78751ee87897bc72c6c2
Submitter: Jenkins
Branch: stable/kilo

commit 28bb8d27d57a034f5e9e78751ee87897bc72c6c2
Author: Xing Yang <email address hidden>
Date: Wed Jun 3 10:40:26 2015 -0400

    Allow provisioning to reach max oversubscription

    Currently if provisioned ratio is equal to max_over_subscription_ratio,
    the capacity filter does not allow any more thin provisioning. This patch
    makes a change so that thin provisioning is allowed if provisioned ratio
    is equal to max_over_subscription_ratio; it will only stop provisioning
    if provisioned ratio is greater than max_over_subscription_ratio.

    Change-Id: Ibf13ef97472b80a1b59ffd4389a4ed2eacf67205
    Partial-Bug: #1458976
    (cherry picked from commit ab017d98b1bb39d218bd93970c0e561c685b7dbf)

Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-1 → 7.0.0
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.