Files
puppet-openstack/manifests/cinder/storage.pp
Dan Bode 986a928f6c ensure cinder volume_group sets the created volume
The openstack::cinder::storage class previously accepted
a parameter called volume_group which was used to set
the name of the volume group that cinder should use to
create managed volumes.

The same class also takes an argument called setup_test_volume
that indicates if a test_volume should be created. The problem
was that this test volume name was not being set as
$volume_group, meaning that they would not match up if the user
supplied a custom volume name.

This patch resolves that issue, ensuring that volume groups
are created with the correct name.

Change-Id: Icbd43ec35b2cc008e5fa84e717fd5804fbe280d0
2013-05-31 14:09:29 -07:00

53 lines
1.5 KiB
Puppet

class openstack::cinder::storage(
$sql_connection,
$rabbit_password,
$rabbit_userid = 'guest',
$rabbit_host = '127.0.0.1',
$rabbit_hosts = undef,
$rabbit_port = '5672',
$rabbit_virtual_host = '/',
$package_ensure = 'present',
$api_paste_config = '/etc/cinder/api-paste.ini',
$volume_package_ensure = 'present',
$volume_group = 'cinder-volumes',
$enabled = true,
$volume_driver = 'iscsi',
$iscsi_ip_address = '127.0.0.1',
$setup_test_volume = false,
$verbose = false
) {
class {'::cinder':
sql_connection => $sql_connection,
rabbit_userid => $rabbit_userid,
rabbit_password => $rabbit_password,
rabbit_host => $rabbit_host,
rabbit_port => $rabbit_port,
rabbit_hosts => $rabbit_hosts,
rabbit_virtual_host => $rabbit_virtual_host,
package_ensure => $package_ensure,
api_paste_config => $api_paste_config,
verbose => $verbose,
}
class { '::cinder::volume':
package_ensure => $volume_package_ensure,
enabled => $enabled,
}
if $volume_driver == 'iscsi' {
class { 'cinder::volume::iscsi':
iscsi_ip_address => $iscsi_ip_address,
volume_group => $volume_group,
}
if $setup_test_volume {
class {'::cinder::setup_test_volume':
volume_name => $volume_group,
}
}
} else {
warning("Unsupported volume driver: ${volume_driver}, make sure you are configuring this yourself")
}
}