manila does not calculate allocated_capacity_gb

Bug #1606691 reported by Goutham Pacha Ravi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
High
NidhiMittalHada

Bug Description

What:
-----
allocated_capacity_gb is currently expected from the drivers as part of capability reporting; If the driver does not provide it, it defaults to 0:

https://github.com/openstack/manila/blob/d8fc55728958429c95635b6418d0d9c0d592af73/manila/scheduler/host_manager.py#L361

Why does this matter:
---------------------
allocated_capacity_gb is a fallback for provisioned_capacity_gb; i.e, when a driver does not report provisioned_capacity_gb for a backend, we set provisioned_capacity_gb to allocated_capacity_gb.

https://github.com/openstack/manila/blob/d8fc55728958429c95635b6418d0d9c0d592af73/manila/scheduler/host_manager.py#L371

provisioned_capacity_gb is essential in calculation of the provisioned_ratio which comes into play while exercising the max_over_subscription_ratio in case of scheduling to backends that support thin_provisioning.

Why this is critical:
----------------------
Some backend have no good or efficient way to report allocated_capacity_gb or provisioned_capacity_gb for a given pool (or the backend itself in case of single pool backends). They would need to sum up the sizes of all the thin and thick shares created on them. With the deployment and operations documentation, we have always recommended that a backend configured for manila be only used by manila. i.e, no other tenants or services should be allowed to create shares on the backend. With this assumption, we can assume that, when the backend does not report allocated_capacity_gb or provisioned_capacity_gb; these values can be calculated by summing up sizes of all the shares of that host from the manila database.

description: updated
Changed in manila:
importance: Undecided → High
description: updated
Changed in manila:
assignee: nobody → NidhiMittalHada (nidhimittal19)
status: New → In Progress
Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

working on this

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/351034

Changed in manila:
milestone: none → newton-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

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

commit af7739aea22bf321c12690ba1c5bf994f420c71d
Author: nidhimittalhada <email address hidden>
Date: Thu Aug 4 12:33:23 2016 +0530

    Add provisioned_capacity_gb estimation

    Currently 'provisioned_capacity_gb' is expected from
    the drivers as part of capability reporting.
    If driver does not provide it, it defaults to 'allocated_capacity_gb'.
    But if driver does not provide both 'allocated_capacity_gb' and
    'provisioned_capacity_gb' then 'provisioned_capacity_gb' defaults to 0.
    Which affects later calculation of 'provisioned_ratio'.

    Hence fixing it by summing up sizes of all the shares of
    that host and taking that as 'provisioned_capacity_gb',
    in such case.

    Change-Id: I844d176eb6f0f5e7b0eb3cbd66c4b413b6757f51
    Closes-Bug: #1606691

Changed in manila:
status: In Progress → Fix Released
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.

Other bug subscribers

Remote bug watches

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