Zero out volumes during deletion to prevent data leaking between users
This commit is contained in:
1
.mailmap
1
.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>
|
||||
|
||||
@@ -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']))
|
||||
|
||||
Reference in New Issue
Block a user