]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
LVM volume_clear: error on unexpected inputs
authorEric Harney <eharney@redhat.com>
Fri, 13 Sep 2013 20:56:44 +0000 (16:56 -0400)
committerEric Harney <eharney@redhat.com>
Tue, 24 Sep 2013 18:55:03 +0000 (14:55 -0400)
commit863ae9f484089aa5d9e576255b39288da82c1100
tree660f62fade8861784db9fc8eeb17138eb01d8991
parente6f4d339e9bcf5537d997dde297d664a91dbd7fe
LVM volume_clear: error on unexpected inputs

Currently if a user configures
volume_clear='non_existent_volume_clearer' in cinder.conf,
the LVM driver will silently delete a volume and not wipe it.

Instead, the delete operation should fail, leaving the volume
in the 'error_deleting' state.

Also fail if the volume reference does not contain either a
'size' or 'volume_size' field.

Closes-Bug: #1225194
Change-Id: I78fec32d7d5aeaa8e2deeac43066ca5e2e26d9ca
cinder/exception.py
cinder/tests/test_volume.py
cinder/volume/drivers/lvm.py