Ceph: Stats are wrong

Bug #1706060 reported by Gorka Eguileor
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Gorka Eguileor

Bug Description

Ceph driver is incorrectly reporting physical volume usage for volumes created by Cinder as provisioned_capacity_gb.

It should be returning the provisioned capacity of all the volumes present in the pool.

Free space is not considering quota from the pool.

Total capacity changes dynamically depending on the free space in each moment, which makes it impossible to have a fixed value of the over provisioning capacity.

Gorka Eguileor (gorka)
Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
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/486734

Changed in cinder:
status: New → In Progress
Gorka Eguileor (gorka)
summary: - Ceph: Allocated capacity incorrectly being reported as Provisioned
+ Ceph: Provisioned capacity being reported incorrectly
description: updated
summary: - Ceph: Provisioned capacity being reported incorrectly
+ Ceph: Stats are wrong
description: updated
Gorka Eguileor (gorka)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 8469109016bcfd5806e230202e1996a8ba649535
Author: Gorka Eguileor <email address hidden>
Date: Thu Aug 3 18:50:12 2017 +0200

    RBD: Fix stats reporting

    Current RBD code is incorrectly reporting the stats of the pool in the
    following ways:

    - `provisioned_capacity_gb` contains physical space used by cinder created
      volumes.
    - `free_capacity_gb` is not taking into account that pools can have quota
      restrictions and they should be used as the reference for the free capacity.
    - `total_capacity` dynamically changes, which means that there is no way to
      have a fixed over provisioning capacity.

    This patch fixes the stats reporting making sure we return the right
    values in `provisioned_capacity_gb` and `free_capacity_gb`, and allows
    us to use a static calculation of the `total_capacity` using
    `report_dynamic_total_capacity` configuration option.

    We don't report `allocated_capacity_gb` because this is something that
    is calculated by the Cinder core code and should not be reported by
    drivers, even if it's not currently working as expected [1][2].

    [1] https://bugs.launchpad.net/cinder/+bug/1712549
    [2] https://bugs.launchpad.net/cinder/+bug/1706057

    Change-Id: I1e82bf9d0b6cc0fb1d1fc2dd8b8ccc59aea3f73f
    Closes-Bug: #1706060

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/501316

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/501325

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

Reviewed: https://review.openstack.org/501316
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=8d7f37e810d3228d8b79e4add1a383abe516d9bb
Submitter: Jenkins
Branch: stable/pike

commit 8d7f37e810d3228d8b79e4add1a383abe516d9bb
Author: Gorka Eguileor <email address hidden>
Date: Thu Aug 3 18:50:12 2017 +0200

    RBD: Fix stats reporting

    Current RBD code is incorrectly reporting the stats of the pool in the
    following ways:

    - `provisioned_capacity_gb` contains physical space used by cinder created
      volumes.
    - `free_capacity_gb` is not taking into account that pools can have quota
      restrictions and they should be used as the reference for the free capacity.
    - `total_capacity` dynamically changes, which means that there is no way to
      have a fixed over provisioning capacity.

    This patch fixes the stats reporting making sure we return the right
    values in `provisioned_capacity_gb` and `free_capacity_gb`, and allows
    us to use a static calculation of the `total_capacity` using
    `report_dynamic_total_capacity` configuration option.

    We don't report `allocated_capacity_gb` because this is something that
    is calculated by the Cinder core code and should not be reported by
    drivers, even if it's not currently working as expected [1][2].

    [1] https://bugs.launchpad.net/cinder/+bug/1712549
    [2] https://bugs.launchpad.net/cinder/+bug/1706057

    Change-Id: I1e82bf9d0b6cc0fb1d1fc2dd8b8ccc59aea3f73f
    Closes-Bug: #1706060
    (cherry picked from commit 8469109016bcfd5806e230202e1996a8ba649535)
    Conflicts:
     cinder/tests/unit/volume/drivers/test_rbd.py
     cinder/volume/drivers/rbd.py

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/ocata)

Reviewed: https://review.openstack.org/501325
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=69a79e38afbdc67f61568c0b82cf6d06ca304e56
Submitter: Jenkins
Branch: stable/ocata

commit 69a79e38afbdc67f61568c0b82cf6d06ca304e56
Author: Gorka Eguileor <email address hidden>
Date: Thu Aug 3 18:50:12 2017 +0200

    RBD: Fix stats reporting

    Current RBD code is incorrectly reporting the stats of the pool in the
    following ways:

    - `provisioned_capacity_gb` contains physical space used by cinder created
      volumes.
    - `free_capacity_gb` is not taking into account that pools can have quota
      restrictions and they should be used as the reference for the free capacity.
    - `total_capacity` dynamically changes, which means that there is no way to
      have a fixed over provisioning capacity.

    This patch fixes the stats reporting making sure we return the right
    values in `provisioned_capacity_gb` and `free_capacity_gb`, and allows
    us to use a static calculation of the `total_capacity` using
    `report_dynamic_total_capacity` configuration option.

    We don't report `allocated_capacity_gb` because this is something that
    is calculated by the Cinder core code and should not be reported by
    drivers, even if it's not currently working as expected [1][2].

    [1] https://bugs.launchpad.net/cinder/+bug/1712549
    [2] https://bugs.launchpad.net/cinder/+bug/1706057

    Change-Id: I1e82bf9d0b6cc0fb1d1fc2dd8b8ccc59aea3f73f
    Closes-Bug: #1706060
    (cherry picked from commit 8469109016bcfd5806e230202e1996a8ba649535)
    Conflicts:
     cinder/tests/unit/volume/drivers/test_rbd.py
     cinder/volume/drivers/rbd.py
    (cherry picked from commit 8d7f37e810d3228d8b79e4add1a383abe516d9bb)
    Conflicts:
          cinder/tests/unit/volume/drivers/test_rbd.py
          cinder/volume/drivers/rbd.py

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.0.0b1

This issue was fixed in the openstack/cinder 12.0.0.0b1 development milestone.

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

This issue was fixed in the openstack/cinder 11.0.1 release.

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

This issue was fixed in the openstack/cinder 10.0.7 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.