compute/hypervisor: add RBD support
Close bug #87 Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
parent
81d2d12d05
commit
c729355ec2
@ -106,6 +106,22 @@ Host *
|
||||
|
||||
class { 'nova::compute::neutron': }
|
||||
|
||||
# TODO(EmilienM) Temporary, while https://review.openstack.org/#/c/72440 got merged
|
||||
nova_config {
|
||||
'DEFAULT/libvirt_images_type': value => 'rbd';
|
||||
'DEFAULT/libvirt_images_rbd_pool': value => 'nova';
|
||||
'DEFAULT/libvirt_images_rbd_ceph_conf': value => '/etc/ceph/ceph.conf';
|
||||
'DEFAULT/rbd_user': value => 'nova';
|
||||
'DEFAULT/rbd_secret_uuid': value => 'secrete';
|
||||
}
|
||||
|
||||
# Extra config for nova-compute
|
||||
nova_config {
|
||||
'DEFAULT/libvirt_inject_key': value => false;
|
||||
'DEFAULT/libvirt_inject_partition': value => '-2';
|
||||
'DEFAULT/live_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST';
|
||||
}
|
||||
|
||||
if $has_ceph {
|
||||
File <<| tag == 'ceph_compute_secret_file' |>>
|
||||
Exec <<| tag == 'get_or_set_virsh_secret' |>>
|
||||
|
@ -105,7 +105,18 @@ describe 'cloud::compute::hypervisor' do
|
||||
it 'configure nova compute with neutron' do
|
||||
should contain_class('nova::compute::neutron')
|
||||
end
|
||||
end
|
||||
|
||||
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_rbd_pool').with('value' => 'nova')
|
||||
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_secret_uuid').with('value' => 'secrete')
|
||||
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/live_migration_flag').with('value' => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST')
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
|
Loading…
x
Reference in New Issue
Block a user