3par driver incorrectly reports total capacity and free capacity when cpg limit is not set in 3par

Bug #1398651 reported by Gloria Gu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Gloria Gu

Bug Description

Currently if the 3par cpg has no limit set, the cinder 3par driver reports total capacity and free capacity from system info represents the whole system instead of the cpg.

Current code:

info = self.client.getStorageSystemInfo()
        for cpg_name in self.config.hp3par_cpg:
            try:
                cpg = self.client.getCPG(cpg_name)
                if 'limitMiB' not in cpg['SDGrowth']:
                    # System capacity is best we can do for now.
                    total_capacity = info['totalCapacityMiB'] * const
                    free_capacity = info['freeCapacityMiB'] * const
                else:
                    total_capacity = int(cpg['SDGrowth']['limitMiB'] * const)
                    free_capacity = int((cpg['SDGrowth']['limitMiB'] -
                                         cpg['UsrUsage']['usedMiB']) * const)

Expectation is to when cpg has not limit set, cinder 3 par driver reports total capacity and free capacity more properly based on the cpg type. The new 3parclient provide 2 API https://github.com/WaltHP/python-3parclient/tree/master/hp3parclient which might be able to help accomplish what we need.

Gloria Gu (gloria-gu)
Changed in cinder:
assignee: nobody → Gloria Gu (gloria-gu)
Gloria Gu (gloria-gu)
Changed in cinder:
status: New → In Progress
description: updated
Changed in cinder:
importance: Undecided → Medium
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/140553

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

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

commit 92888e514b37c3ce3c0502e66e183a40da1b4249
Author: Gloria Gu <email address hidden>
Date: Tue Dec 9 17:56:09 2014 -0800

    Report better capacity info for a limitless 3par cpg

    This change has the following improvement:

    1. Uses getCPGAvailableSpace from hp3parclient to report
    free_capapcity for a limitless cpg.

    2. Uses cpg's SDUsage.usedMiB + UsrUsage.usedMiB + free_capacity
    to calculate the total_capacity for a limitless cpg. This is the
    best we can do for a limitless cpg.

    Closes-Bug: #1398651
    Change-Id: I62f446786360c61288a788be29d1daa6e409c7b1

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