CINDER_SECURE_DELETE previously iniset volume_clear to none as a
side effect, however secure_delete is not documented in cinder.
Now using CINDER_VOLUME_CLEAR outright. CINDER_SECURE_DELETE is
supported but now deprecated.
Change-Id: Ic8694cf16654c23b27d23853a9f06ddf1050fa93
Closes-Bug: #1450159
| ... | ... |
@@ -77,9 +77,20 @@ CINDER_ENABLED_BACKENDS=${CINDER_ENABLED_BACKENDS:-lvm:lvmdriver-1}
|
| 77 | 77 |
|
| 78 | 78 |
|
| 79 | 79 |
# Should cinder perform secure deletion of volumes? |
| 80 |
-# Defaults to true, can be set to False to avoid this bug when testing: |
|
| 80 |
+# Defaults to zero. Can also be set to none or shred. |
|
| 81 |
+# This was previously CINDER_SECURE_DELETE (True or False). |
|
| 82 |
+# Equivalents using CINDER_VOLUME_CLEAR are zero and none, respectively. |
|
| 83 |
+# Set to none to avoid this bug when testing: |
|
| 81 | 84 |
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1023755 |
| 82 |
-CINDER_SECURE_DELETE=$(trueorfalse True CINDER_SECURE_DELETE) |
|
| 85 |
+if [[ -n $CINDER_SECURE_DELETE ]]; then |
|
| 86 |
+ CINDER_SECURE_DELETE=$(trueorfalse True CINDER_SECURE_DELETE) |
|
| 87 |
+ if [[ $CINDER_SECURE_DELETE == "False" ]]; then |
|
| 88 |
+ CINDER_VOLUME_CLEAR_DEFAULT="none" |
|
| 89 |
+ fi |
|
| 90 |
+ DEPRECATED_TEXT="$DEPRECATED_TEXT\nConfigure secure Cinder volume deletion using CINDER_VOLUME_CLEAR instead of CINDER_SECURE_DELETE.\n" |
|
| 91 |
+fi |
|
| 92 |
+CINDER_VOLUME_CLEAR=${CINDER_VOLUME_CLEAR:-${CINDER_VOLUME_CLEAR_DEFAULT:-zero}}
|
|
| 93 |
+CINDER_VOLUME_CLEAR=$(echo ${CINDER_VOLUME_CLEAR} | tr '[:upper:]' '[:lower:]')
|
|
| 83 | 94 |
|
| 84 | 95 |
# Cinder reports allocations back to the scheduler on periodic intervals |
| 85 | 96 |
# it turns out we can get an "out of space" issue when we run tests too |
| ... | ... |
@@ -256,9 +267,8 @@ function configure_cinder {
|
| 256 | 256 |
|
| 257 | 257 |
iniset_rpc_backend cinder $CINDER_CONF |
| 258 | 258 |
|
| 259 |
- if [[ "$CINDER_SECURE_DELETE" == "False" ]]; then |
|
| 260 |
- iniset $CINDER_CONF DEFAULT secure_delete False |
|
| 261 |
- iniset $CINDER_CONF DEFAULT volume_clear none |
|
| 259 |
+ if [[ "$CINDER_VOLUME_CLEAR" == "none" ]] || [[ "$CINDER_VOLUME_CLEAR" == "zero" ]] || [[ "$CINDER_VOLUME_CLEAR" == "shred" ]]; then |
|
| 260 |
+ iniset $CINDER_CONF DEFAULT volume_clear $CINDER_VOLUME_CLEAR |
|
| 262 | 261 |
fi |
| 263 | 262 |
|
| 264 | 263 |
# Format logging |