Use LVM_VOLUME_CLEAR if set

There are a few CI efforts going on related to jobs that use the lvm
image backend for the libvirt driver in Nova. We don't want to waste
time zero'ing out volumes during CI runs, so we need a way to configure
nova to not clear the volumes in these jobs.

This change adds a variable used to set the CONF.libvirt.volume_clear
value in nova.conf. If the variable isn't set, Nova just uses the default.

This will be set to 'none' in the jobs that are going to use LVM.

Co-Authored-By: Matt Riedemann <mriedem@us.ibm.com>

Change-Id: I1e97ba6ab4772a87192ae2689a25050d432358ab
This commit is contained in:
Chuck Carmack 2015-08-22 15:03:27 +00:00 committed by Matt Riedemann
parent ceb63203b2
commit ea76f319a2

@ -604,6 +604,9 @@ function create_nova_conf {
if [[ "$NOVA_BACKEND" == "LVM" ]]; then
iniset $NOVA_CONF libvirt images_type "lvm"
iniset $NOVA_CONF libvirt images_volume_group $DEFAULT_VOLUME_GROUP_NAME
if isset LVM_VOLUME_CLEAR; then
iniset $NOVA_CONF libvirt volume_clear "$LVM_VOLUME_CLEAR"
fi
fi
if is_ssl_enabled_service glance || is_service_enabled tls-proxy; then