Due to gating issues caused by secure delete on LVM volumes,
add the ability to disable via flag.secure_delete.
Default will be set to True, but we add a way for the gate tests
to disable this until we can come up with a fix for
https://bugs.launchpad.net/cinder/+bug/
1023755 OR implement an alternative
secure delete method that doesn' suck.
Change-Id: I2a06e4f0021ba1f5d5aad7d0a5997a992e268858
cfg.StrOpt('control_exchange',
default='cinder',
help='AMQP exchange to connect to if using RabbitMQ or Qpid'),
+ cfg.BoolOpt('secure_delete',
+ default=True,
+ help='Whether to perform secure delete'),
]
FLAGS.register_opts(global_opts)
# TODO(ja): reclaiming space should be done lazy and low priority
dev_path = self.local_path(volume)
if os.path.exists(dev_path):
- #self._copy_volume('/dev/zero', dev_path, size_in_g)
+ if FLAGS.secure_delete:
+ self._copy_volume('/dev/zero', dev_path, size_in_g)
self._try_execute('dmsetup', 'remove', '-f', dev_path,
run_as_root=True)
self._try_execute('lvremove', '-f', "%s/%s" %