get_volume_stats() will report wrong capacity number if GPFS is unmounted

Bug #1246779 reported by Qin Zhao on 2013-10-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Qin Zhao

Bug Description

_get_available_capacity() calls df command to gather the capacity number of GPFS filesystem. If GPFS is unmounted, df command will return the capacity of root file system.

Here is the debug log that I catch:

----------------------------------------------------------------------------------------------------------------------------------------------
2013-10-31 23:42:53.685 26519 ERROR cinder.volume.drivers.gpfs [req-05127463-4c1d-49af-a3d0-f73c26f75264 None None] Filesystem 1-blocks Used Available Capacity Mounted on
/dev/fs2 8589934592 178257920 8411676672 3% /gpfs/fs2

2013-10-31 23:42:59.875 26518 INFO cinder.volume.manager [req-22088a71-6345-4961-9ca5-4614739ffbe7 None None] CN-A56DF8D Updating volume status
2013-10-31 23:43:53.701 26519 INFO cinder.volume.manager [-] CN-A56DF8D Updating volume status
2013-10-31 23:43:53.754 26519 ERROR cinder.volume.drivers.gpfs [-] Filesystem 1-blocks Used Available Capacity Mounted on
/dev/mapper/vg_zhaoqinrhel-lv_root 29171535872 4679168000 23010521088 17% /

2013-10-31 23:43:59.962 26518 INFO cinder.volume.manager [-] CN-A56DF8D Updating volume status
-----------------------------------------------------------------------------------------------------------------------------------------------

Qin Zhao (zhaoqin) wrote :

I open this bug, because I hope to discuss what capacity number should we return if one GPFS volume node is unmounted. Personally, I do not prefer to let Cinder code to re-mount GPFS, because admin may need to unmount the filesystem temporarily to perform mantainence task. And if this volume node is a multi-backend node, he may not hope to shutdown cinder volume service. If we have several GPFS volume service running on different hosts, maybe we can let get_volume_stats() to report zero capacity, so that Cinder will schedule the volume request to another GPFS volume node. After GPFS is mounted again, the correct capacity number will be reported.

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

Changed in cinder:
assignee: nobody → Qin Zhao (zhaoqin)
status: New → In Progress
Qin Zhao (zhaoqin) on 2013-11-12
tags: added: driver
tags: added: gpfs
tags: added: drivers
removed: driver

Reviewed: https://review.openstack.org/55686
Committed: http://github.com/openstack/cinder/commit/5ec46e1810d1a0af03e5517a00090e9a30909cae
Submitter: Jenkins
Branch: master

commit 5ec46e1810d1a0af03e5517a00090e9a30909cae
Author: zhaoqin <email address hidden>
Date: Sat Nov 9 01:45:02 2013 +0800

    Report zero capacity if GPFS is unmounted

    _get_available_capacity() calls df command to gather the capacity of GPFS
    filesystem. If GPFS is unmounted, df command will return the capacity of
    root file system. This change will let get_volume_stats() to report zero
    capacity, so that Cinder can schedule the volume request to another volume
    service After GPFS is mounted again, the correct capacity will be reported.

    Change-Id: I4c229d78e7d659604a23a50e6ab46060642b4088
    Closes-Bug: #1246779

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-12-04
Changed in cinder:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers