* nova/virt/libvirt/utils.py (remove_logical_volumes):
Overwrite each logical volume with zero
(clear_logical_volume): LV obfuscation implementation.
(logical_volume_size): A utility function used by
clear_logical_volume()
libvirt: support configurable wipe methods for LVM backed instances
Provide configurable methods to clear these volumes.
The new 'volume_clear' and 'volume_clear_size' options
are the same as currently supported by cinder.
* nova/virt/libvirt/imagebackend.py: Define the new options.
* nova/virt/libvirt/utils.py (clear_logical_volume): Support the
new options. Refactor the existing dd method out to
_zero_logic_volume().
* nova/tests/virt/libvirt/test_libvirt_utils.py: Add missing test cases
for the existing clear_logical_volume code, and for the new code
supporting the new clearing methods.
* etc/nova/nova.conf.sample: Add the 2 new config descriptions
to the [libvirt] section.
We've had to deal with this problem before in Nova with the libvirt driver with its LVM volume backend.
In that case we will wipe the data at VM teardown, to ensure future VMs don't see any data from previous tenants
commit 9d2ea970422591f 8cdc394001be9a2 deca499a5f
Author: Pádraig Brady <email address hidden>
Date: Fri Nov 23 14:59:13 2012 +0000
Don't leak info from libvirt LVM backed instances
* nova/virt/ libvirt/ utils.py (remove_ logical_ volumes) : logical_ volume) : LV obfuscation implementation. volume_ size): A utility function used by logical_ volume( )
Overwrite each logical volume with zero
(clear_
(logical_
clear_
Fixes bug: 1070539 0be3b0d6437c836 d2042862f85
Change-Id: I4e1024de8dfe9b
We made this behaviour configurable with a nova.conf setting
commit 71946855591a41d cc87ef59656a8a3 40774eeaf2
Author: Pádraig Brady <email address hidden>
Date: Tue Feb 11 11:51:39 2014 +0000
libvirt: support configurable wipe methods for LVM backed instances
Provide configurable methods to clear these volumes.
The new 'volume_clear' and 'volume_clear_size' options
are the same as currently supported by cinder.
* nova/virt/ libvirt/ imagebackend. py: Define the new options. libvirt/ utils.py (clear_ logical_ volume) : Support the logic_volume( ). virt/libvirt/ test_libvirt_ utils.py: Add missing test cases volume code, and for the new code nova.conf. sample: Add the 2 new config descriptions
* nova/virt/
new options. Refactor the existing dd method out to
_zero_
* nova/tests/
for the existing clear_logical_
supporting the new clearing methods.
* etc/nova/
to the [libvirt] section.
Change-Id: I5551197f9ec89a e2f9b051696bccd eb1af2c031f
Closes-Bug: #889299
IMHO we should move this config setting & code out of the libvirt section into the general nova.conf section and re-use the logic for baremetal.