From 9278eb78dfc47e3b48e2b72faf90efc6bb44e18f Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 18 May 2016 13:38:38 -0400 Subject: [PATCH] Move setting lvm libvirt configs to hypervisor-libvirt When the nova backend is LVM we set some libvirt configs in nova.conf. Those should happen in the libvirt plugin file rather than the generic nova file since it's specific to running nova-compute with libvirt. Change-Id: I37a63a5fba2e9eea4daafe4ec390b2e7aac236f3 --- lib/nova | 8 -------- lib/nova_plugins/hypervisor-libvirt | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/nova b/lib/nova index de898b23fd..af5d1222a0 100644 --- a/lib/nova +++ b/lib/nova @@ -589,14 +589,6 @@ function create_nova_conf { iniset $NOVA_CONF cinder os_region_name "$REGION_NAME" - 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 iniset $NOVA_CONF DEFAULT glance_protocol https fi diff --git a/lib/nova_plugins/hypervisor-libvirt b/lib/nova_plugins/hypervisor-libvirt index 1b4f7ae80a..d0e364efc3 100644 --- a/lib/nova_plugins/hypervisor-libvirt +++ b/lib/nova_plugins/hypervisor-libvirt @@ -68,6 +68,12 @@ function configure_nova_hypervisor { iniset $NOVA_CONF vnc vncserver_proxyclient_address $HOST_IP iniset $NOVA_CONF vnc vncserver_listen $HOST_IP iniset $NOVA_CONF vnc keymap + elif [[ "$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 }