compute/hypervisor: Fix Ceph configuration

Close bug #87

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi 2014-02-11 17:07:03 +01:00
parent f0f45e1c9e
commit b4c47a598d
2 changed files with 11 additions and 5 deletions

View File

@ -34,6 +34,9 @@ class cloud::compute::hypervisor(
$nova_ssh_private_key = $os_params::nova_ssh_private_key, $nova_ssh_private_key = $os_params::nova_ssh_private_key,
$nova_ssh_public_key = $os_params::nova_ssh_public_key, $nova_ssh_public_key = $os_params::nova_ssh_public_key,
$spice_port = $os_params::spice_port, $spice_port = $os_params::spice_port,
$rbd_user = $os_params::cinder_rbd_user,
$rbd_pool = $os_params::cinder_rbd_pool,
$rbd_secret_uuid = $os_params::cinder_rbd_secret_uuid,
$has_ceph = false $has_ceph = false
) { ) {
@ -111,10 +114,10 @@ Host *
# TODO(EmilienM) Temporary, while https://review.openstack.org/#/c/72440 got merged # TODO(EmilienM) Temporary, while https://review.openstack.org/#/c/72440 got merged
nova_config { nova_config {
'DEFAULT/libvirt_images_type': value => 'rbd'; 'DEFAULT/libvirt_images_type': value => 'rbd';
'DEFAULT/libvirt_images_rbd_pool': value => 'nova'; 'DEFAULT/libvirt_images_rbd_pool': value => $rbd_pool;
'DEFAULT/libvirt_images_rbd_ceph_conf': value => '/etc/ceph/ceph.conf'; 'DEFAULT/libvirt_images_rbd_ceph_conf': value => '/etc/ceph/ceph.conf';
'DEFAULT/rbd_user': value => 'nova'; 'DEFAULT/rbd_user': value => $rbd_user;
'DEFAULT/rbd_secret_uuid': value => 'secrete'; 'DEFAULT/rbd_secret_uuid': value => $rbd_secret_uuid;
} }
# Extra config for nova-compute # Extra config for nova-compute

View File

@ -54,6 +54,9 @@ describe 'cloud::compute::hypervisor' do
:server_proxyclient_address => '7.0.0.1', :server_proxyclient_address => '7.0.0.1',
:spice_port => '6082', :spice_port => '6082',
:has_ceph => true, :has_ceph => true,
:rbd_user => 'cinder',
:rbd_pool => 'cinder',
:rbd_secret_uuid => 'secrete',
:nova_ssh_private_key => 'secrete', :nova_ssh_private_key => 'secrete',
:nova_ssh_public_key => 'public', :nova_ssh_public_key => 'public',
:ks_nova_internal_proto => 'http', :ks_nova_internal_proto => 'http',
@ -142,9 +145,9 @@ describe 'cloud::compute::hypervisor' do
it 'configure nova-conpute to support RBD backend' do it 'configure nova-conpute to support RBD backend' do
should contain_nova_config('DEFAULT/libvirt_images_type').with('value' => 'rbd') should contain_nova_config('DEFAULT/libvirt_images_type').with('value' => 'rbd')
should contain_nova_config('DEFAULT/libvirt_images_rbd_pool').with('value' => 'nova') should contain_nova_config('DEFAULT/libvirt_images_rbd_pool').with('value' => 'cinder')
should contain_nova_config('DEFAULT/libvirt_images_rbd_ceph_conf').with('value' => '/etc/ceph/ceph.conf') should contain_nova_config('DEFAULT/libvirt_images_rbd_ceph_conf').with('value' => '/etc/ceph/ceph.conf')
should contain_nova_config('DEFAULT/rbd_user').with('value' => 'nova') should contain_nova_config('DEFAULT/rbd_user').with('value' => 'cinder')
should contain_nova_config('DEFAULT/rbd_secret_uuid').with('value' => 'secrete') should contain_nova_config('DEFAULT/rbd_secret_uuid').with('value' => 'secrete')
should contain_nova_config('DEFAULT/libvirt_inject_key').with('value' => false) should contain_nova_config('DEFAULT/libvirt_inject_key').with('value' => false)
should contain_nova_config('DEFAULT/libvirt_inject_partition').with('value' => '-2') should contain_nova_config('DEFAULT/libvirt_inject_partition').with('value' => '-2')