Browse code

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

Chuck Carmack authored on 2015/08/23 00:03:27
Showing 1 changed files
... ...
@@ -604,6 +604,9 @@ function create_nova_conf {
604 604
     if [[ "$NOVA_BACKEND" == "LVM" ]]; then
605 605
         iniset $NOVA_CONF libvirt images_type "lvm"
606 606
         iniset $NOVA_CONF libvirt images_volume_group $DEFAULT_VOLUME_GROUP_NAME
607
+        if isset LVM_VOLUME_CLEAR; then
608
+            iniset $NOVA_CONF libvirt volume_clear "$LVM_VOLUME_CLEAR"
609
+        fi
607 610
     fi
608 611
 
609 612
     if is_ssl_enabled_service glance || is_service_enabled tls-proxy; then