summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Andrews <anotherjesse@gmail.com>2011-04-13 17:19:25 +0000
committerTarmac <>2011-04-13 17:19:25 +0000
commit5c9cfbd4aab55ac755cbfcd24922c2e883bcbe8b (patch)
treeaeb02a0df5d671800de903935335050438587c51
parentff39c824f46513621383a2ebdbc0ff1427fe7d8e (diff)
parent7206aa7af5f7d945ce9dfeff8de786bfd416ab21 (diff)
Zero out volumes during deletion to prevent data leaking between users
-rw-r--r--.mailmap1
-rw-r--r--nova/volume/driver.py6
2 files changed, 7 insertions, 0 deletions
diff --git a/.mailmap b/.mailmap
index ccf2109a7..7e031fc7c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -4,6 +4,7 @@
<anotherjesse@gmail.com> <jesse@dancelamb>
<anotherjesse@gmail.com> <jesse@gigantor.local>
<anotherjesse@gmail.com> <jesse@ubuntu>
+<anotherjesse@gmail.com> <jesse@aire.local>
<ant@openstack.org> <amesserl@rackspace.com>
<Armando.Migliaccio@eu.citrix.com> <armando.migliaccio@citrix.com>
<brian.lamar@rackspace.com> <brian.lamar@gmail.com>
diff --git a/nova/volume/driver.py b/nova/volume/driver.py
index 85ff17708..55307ad9b 100644
--- a/nova/volume/driver.py
+++ b/nova/volume/driver.py
@@ -112,6 +112,12 @@ class VolumeDriver(object):
# If the volume isn't present, then don't attempt to delete
return True
+ # zero out old volumes to prevent data leaking between users
+ # TODO(ja): reclaiming space should be done lazy and low priority
+ self._execute('sudo', 'dd', 'if=/dev/zero',
+ 'of=%s' % self.local_path(volume),
+ 'count=%d' % (volume['size'] * 1024),
+ 'bs=1M')
self._try_execute('sudo', 'lvremove', '-f', "%s/%s" %
(FLAGS.volume_group,
volume['name']))