Some of the changes to the LVM secure_delete features introduced a bug where cinder.volume.drivers.lvm:clear_volume only checks the reference obejcts "size" parameter and returns if None. The problem is that the clear_volume method is also used to clear snapshots on delete.
This is easily fixed by changing size_in_g = volume.get('size') to (volume.get('size') or volume.get('snapshot_size'), however this introduces yet another problem.
On Ubuntu Precise we're still plagued by: https://bugs.launchpad.net/cinder/+bug/1023755
So I think the best we can do right now is to log info regarding what we're doing here, or at the very least comment/document in the code that skipping secure_delete on the LVM snapshot is intentional.
It may also be worth checking /etc/issue and deciding how to proceed based on that.
Fix proposed to branch: master /review. openstack. org/24987
Review: https:/