2013-02-27 22:38:30 |
John Griffith |
description |
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.
The addition of the fdatasync to the dd seems fine for standard LVM volumes, however the dd throws an IO error for LVM snapshots every time. We'll need to add some special handling for snapshots. This is why things like synch and direct flags were removed in the past, maybe we can compromise and leave them in for regular volumes but not set them for snapshots. |
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. |
|