max_over_subscription_ratio is miscalculated for drivers reporting list [True, False] for thin_provisioning

Bug #1578718 reported by Goutham Pacha Ravi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
High
Xing Yang

Bug Description

For a pool that supports thin_provisioning, the capacity weigher uses the configuration of max_over_subscription_ratio to figure out the expected pool capacity as against the reported capacity.

However, currently :https://github.com/openstack/manila/blob/af2e103/manila/scheduler/weighers/capacity.py#L66 lists resolve to 'True' and if thick_provisioned volumes eat up capacity, the calculation goes awry.

Tags: netapp
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

Looking at the way the current filter is implemented, this is a fail point for backends that can support both thick/thin shares. If we intend to support both thick/thin, the following changes are necessary: (one way of solving the problem, open for discussion)

1) Make every share_type have a required extra_spec - 'thin_provisioning' (False by default)
2) Copy this extra_spec into the share model, i.e brand a share as being 'thick' or 'thin'
3) In the Capacity Filter, calculate the sum of sizes of 'thick' shares that have already been accommodated on your pool that supports both 'thick' and 'thin' shares (simple DB call), subtract this from the advertised 'free_space' before multiplying this free_space with the max_over_subscription_ratio and inflating it as 'adjusted_free_virtual' in case you are provisioning a 'thin' share. If you are provisioning a thick share, a simple free space check should suffice.

Thoughts?

tags: added: netapp
description: updated
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

The only driver that supports both thick/thin for all pools currently is the NetApp driver.

Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

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

Changed in manila:
importance: Undecided → Medium
assignee: nobody → Xing Yang (xing-yang)
Changed in manila:
status: New → In Progress
Xing Yang (xing-yang)
Changed in manila:
milestone: none → newton-rc1
Changed in manila:
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Changed in manila:
assignee: Xing Yang (xing-yang) → Goutham Pacha Ravi (gouthamr)
Changed in manila:
assignee: Goutham Pacha Ravi (gouthamr) → Xing Yang (xing-yang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/315266
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=83c93c776707d5da9c89cde81c03022178127261
Submitter: Jenkins
Branch: master

commit 83c93c776707d5da9c89cde81c03022178127261
Author: xing-yang <email address hidden>
Date: Wed May 11 15:23:31 2016 -0400

    Check 'thin_provisioning' in extra specs

    Currently in the capacity filter and weigher of the scheduler,
    we use the logic to evaluate whether there is enough capacity
    to thin provision a share on a backend if the driver reports
    thin_provisioning to be True. However, a driver may be able to
    support both thin and thick provisioning. The logic does not
    check whether the user wants the share to be provisioned as thin
    or not.

    In this patch, we check 'thin_provisioning' in extra specs of the
    share type and decide whether to use the logic for thin or thick.
    In the following two cases, we will use the thin logic:
    1) 'thin_provisioning' is not set in extra specs. This is to
       provide backward compatibility.
    2) 'thin_provisioning' is set in extra specs and it is
       '<is> True' or 'True'.

    To provision a thick share on a backend that supports both
    thin and thick, set one of the following in extra specs:
        {'thin_provisioning': 'False'}
        {'thin_provisioning': '<is> False'}
        {'capabilities:thin_provisioning': 'False'}
        {'capabilities:thin_provisioning': '<is> False'}

    DocImpact
    Change-Id: I238a7962425ea35c356c5ed2e31b8f68462b3769
    Closes-Bug: #1578718

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

Reviewed: https://review.openstack.org/367466
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=2d957f389086bb1499dacf5c76a1fba21f99cc54
Submitter: Jenkins
Branch: master

commit 2d957f389086bb1499dacf5c76a1fba21f99cc54
Author: xing-yang <email address hidden>
Date: Thu Jul 21 09:14:04 2016 -0400

    Documentation changes for thin/thick provisioning

    This patch adds documentation changes for the logic changed
    to address thin/thick provisioning in the following patch:
        https://review.openstack.org/#/c/315266/

    Change-Id: I6a15a572abd7ccec59917bd58db5e3cca32d77a3
    Partial-Bug: #1578718

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 3.0.0.0rc1

This issue was fixed in the openstack/manila 3.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 3.0.0

This issue was fixed in the openstack/manila 3.0.0 release.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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