volume record can be deleted when GPFS is unmounted

Bug #1249411 reported by Qin Zhao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Qin Zhao

Bug Description

Unmount GPFS immediately after creating one volume on GPFS volume node. Then, run "cinder delete" to delete that volume. The command complete successfully, and the volume record was deleted. The volume file was left on NSD and can not be operated by cinder anymore.

I have complete re-testing all volume/snapshot operations. Other operations will fail accordingly after the filesystem is unmounted, and errors are loged. delete_voluem() is the only one that need to be fixed.

---------------------------------------------------------------------------------------------------------------

[root@zhaoqin-RHEL-GPFS1 cinder]# cinder create --volume-type=gpfs --display-name=hehe 1
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2013-11-08T16:08:00.968955 |
| display_description | None |
| display_name | hehe |
| id | f627df92-44af-4f28-a56e-39bd6ff700b9 |
| metadata | {} |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| volume_type | gpfs |
+---------------------+--------------------------------------+
[root@zhaoqin-RHEL-GPFS1 cinder]# cinder list | grep hehe
| f627df92-44af-4f28-a56e-39bd6ff700b9 | available | hehe | 1 | gpfs | false | |
[root@zhaoqin-RHEL-GPFS1 cinder]# ls /gpfs/fs2 | grep f627df92-44af-4f28-a56e-39bd6ff700b9
volume-f627df92-44af-4f28-a56e-39bd6ff700b9
[root@zhaoqin-RHEL-GPFS2 cinder]# mmunmount fs2
Sat Nov 9 00:10:28 CST 2013: mmunmount: Unmounting file systems ...
[root@zhaoqin-RHEL-GPFS1 cinder]# ls /gpfs/fs2
[root@zhaoqin-RHEL-GPFS1 cinder]# cinder delete f627df92-44af-4f28-a56e-39bd6ff700b9
[root@zhaoqin-RHEL-GPFS1 cinder]# cinder list | grep f627df92-44af-4f28-a56e-39bd6ff700b9

Tags: drivers gpfs
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/55690

Changed in cinder:
assignee: nobody → Qin Zhao (zhaoqin)
status: New → In Progress
Qin Zhao (zhaoqin)
tags: added: gpfs
tags: added: drivers
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 5fc5ba9ccbb5786bc2e4d11e47c0b92f1cf56a42
Author: zhaoqin <email address hidden>
Date: Sat Nov 9 02:27:49 2013 +0800

    Do not remove volume silently if GPFS is unmounted

    When GPFS is not mounted, delete_volume() will complete successfully, so that
    volume record is removed by cinder but volume file still resides on GPFS. This
    change will prevent cinder to remove volume when GPFS is not mounted.

    Change-Id: Ic3bf265e553f22c8b6a6e3568da04af88fab3322
    Closes-Bug: #1249411

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