]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Can't force-create snapshot by an non-exist error volume
authorlirenke <lvhancy@163.com>
Tue, 4 Mar 2014 12:59:07 +0000 (04:59 -0800)
committerlirenke <lvhancy@163.com>
Wed, 19 Mar 2014 13:52:47 +0000 (06:52 -0700)
commit379273925517e8b9bf971e018a1dc41f809c4814
treeef8d67402875d82a68f69e6dbf9c596da4420eea
parentee371dfc56e9a633ba56bd05f7a32a1e3744fef2
Can't force-create snapshot by an non-exist error volume

If we create an LVM volume whose size larger than
rest space in VG, the volume would not exist with
error status.
But then we still can force create a snapshot
by this volume, and the snapshot's status is available.
In the code,I found in create_lv_snapshot,
it return False when fail to get the volume.
However, raising an exception is only way to be
handle outside.
So, we should raise exception instead of return False.

Closes-Bug: #1283338

Change-Id: I80256f19d66da460c95ff23834abb79a557763bf
cinder/brick/local_dev/lvm.py
cinder/tests/brick/test_brick_lvm.py