From fd16fee9e7c2a77d9f7f7c1512512a47afbb6ec6 Mon Sep 17 00:00:00 2001 From: Hugh Saunders Date: Mon, 15 Sep 2014 14:03:20 +0100 Subject: [PATCH] Set cinder volume clear Fixes #102 Also adds variables for: * volume_clear_ionice * volume_clear_size --- rpc_deployment/inventory/group_vars/cinder_all.yml | 10 ++++++++++ .../roles/cinder_common/templates/cinder.conf | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/rpc_deployment/inventory/group_vars/cinder_all.yml b/rpc_deployment/inventory/group_vars/cinder_all.yml index 85b5bacc44..4de1d3adea 100644 --- a/rpc_deployment/inventory/group_vars/cinder_all.yml +++ b/rpc_deployment/inventory/group_vars/cinder_all.yml @@ -27,6 +27,16 @@ verbose: True container_lvm_fstype: ext4 container_lvm_fssize: 5GB +# (StrOpt) Method used to wipe old voumes (valid options are: none, zero, +# shred) +cinder_volume_clear: zero +# (StrOpt) The flag to pass to ionice to alter the i/o priority of the process +# used to zero a volume after deletion, for example "-c3" for idle only +# priority. +# cinder_volume_clear_ionice: -c3 +# (IntOpt) Size in MiB to wipe at start of old volumes. 0 => all +cinder_volume_clear_size: 0 + ## General configuration ## Set this in rpc_user_config.yml UNLESS you want all hosts to use the same ## Cinder backends. See the rpc_user_config example for more on how this is done. diff --git a/rpc_deployment/roles/cinder_common/templates/cinder.conf b/rpc_deployment/roles/cinder_common/templates/cinder.conf index 144e8a5e55..29e632a492 100644 --- a/rpc_deployment/roles/cinder_common/templates/cinder.conf +++ b/rpc_deployment/roles/cinder_common/templates/cinder.conf @@ -13,7 +13,11 @@ lock_path = /var/lock/cinder rootwrap_config = /etc/cinder/rootwrap.conf api_paste_config = /etc/cinder/api-paste.ini auth_strategy = keystone -volume_clear = none +volume_clear = {{ cinder_volume_clear }} +{% if cinder_volume_clear_ionice is defined %} +volume_clear_ionice = {{ cinder_volume_clear_ionice }} +{% endif %} +volume_clear_size = {{ cinder_volume_clear_size }} nova_catalog_info=compute:nova:internalURL nova_catalog_admin_info=compute:nova:adminURL