cinder-volume: prevent LVM backend overallocation when creating snapshots

Bug #1605033 reported by vu tran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned

Bug Description

When cinder-volume LVM backend is configured as thin-provisioning, when requesting a snapshot there is currently no check for free space. This allows us to create a large volume, dirty it, make a snapshot, rewrite the original volume, and run out of space in the thin pool.

To reproduce on devstack:

* On controller node, modify /etc/cinder/cinder.conf to have "max_over_subscription_ratio = 1.0" and "lvm_type = thin" and restart cinder-volume service.
* On my devstack, the default thin-pool stack-volumes-lvmdriver-1 has size of 9.51g
* Create 6g cinder volume
* Spawn VM that has volume created above attached
* Log into VM and dirty all /dev/vdb with dd
* On Controller node, create a snapshot of the volume
* Log into VM and dirty all /dev/vdb with dd again
* The thin pool stack-volumes-lvmdriver-1 reaches 100% data usage

vu tran (vu-tran)
Changed in cinder:
assignee: nobody → vu tran (vu-tran)
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/348491

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/348491
Reason: This review is > 4 weeks without comment and currently blocked by a core reviewer with a -2. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and contacting the reviewer with the -2 on this review to ensure you address their concerns.

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Assignee Expired

Unassigning due to no activity for > 6 months.

Changed in cinder:
assignee: vu tran (vu-tran) → nobody
status: In Progress → New
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.