From 5eab169ec10655f8c35e06f265d177323663b7c0 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Fri, 25 May 2012 16:24:51 -0700 Subject: [PATCH] Add volume management option for compute nodes This commit adds an option that can be used to enable volume management on compute nodes. It also adds a parameter that can be used to determine the name of the volume group where volumes should be allocated from. --- manifests/compute.pp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/manifests/compute.pp b/manifests/compute.pp index ae5481e..3bb9843 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -38,6 +38,10 @@ # Optional. Defaults to 'true', # [verbose] Rather components should log verbosely. # Optional. Defaults to false. +# [manage_volumes] Rather nova-volume should be enabled on this compute node. +# Optional. Defaults to false. +# [nova_volumes] Name of volume group in which nova-volume will create logical volumes. +# Optional. Defaults to nova-volumes. # class openstack::compute( $private_interface, @@ -59,7 +63,9 @@ class openstack::compute( $libvirt_type = 'kvm', $vncproxy_host = false, $vnc_enabled = 'true', - $verbose = false + $verbose = false, + $manage_volumes = false, + $nova_volume = 'nova-volumes' ) { class { 'nova': @@ -121,4 +127,16 @@ class openstack::compute( install_service => $enable_network_service, } + if $manage_volumes { + + class { 'nova::volume': + enabled => true, + } + + class { 'nova::volume::iscsi': + volume_group => $nova_volume, + iscsi_ip_address => $internal_address, + } + } + }