Merge pull request #221 from enovance/bug/87/emilien
compute/hypervisor: Fix Ceph configuration
This commit is contained in:
		@@ -34,6 +34,9 @@ class cloud::compute::hypervisor(
 | 
			
		||||
  $nova_ssh_private_key       = $os_params::nova_ssh_private_key,
 | 
			
		||||
  $nova_ssh_public_key        = $os_params::nova_ssh_public_key,
 | 
			
		||||
  $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
 | 
			
		||||
) {
 | 
			
		||||
 | 
			
		||||
@@ -110,10 +113,10 @@ Host *
 | 
			
		||||
    # 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_pool':      value => $rbd_pool;
 | 
			
		||||
      'DEFAULT/libvirt_images_rbd_ceph_conf': value => '/etc/ceph/ceph.conf';
 | 
			
		||||
      'DEFAULT/rbd_user':                     value => 'nova';
 | 
			
		||||
      'DEFAULT/rbd_secret_uuid':              value => 'secrete';
 | 
			
		||||
      'DEFAULT/rbd_user':                     value => $rbd_user;
 | 
			
		||||
      'DEFAULT/rbd_secret_uuid':              value => $rbd_secret_uuid;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # Extra config for nova-compute
 | 
			
		||||
 
 | 
			
		||||
@@ -42,6 +42,9 @@ describe 'cloud::compute::hypervisor' do
 | 
			
		||||
        :server_proxyclient_address           => '7.0.0.1',
 | 
			
		||||
        :spice_port                           => '6082',
 | 
			
		||||
        :has_ceph                             => true,
 | 
			
		||||
        :rbd_user                             => 'cinder',
 | 
			
		||||
        :rbd_pool                             => 'cinder',
 | 
			
		||||
        :rbd_secret_uuid                      => 'secrete',
 | 
			
		||||
        :nova_ssh_private_key                 => 'secrete',
 | 
			
		||||
        :nova_ssh_public_key                  => 'public',
 | 
			
		||||
        :ks_nova_internal_proto               => 'http',
 | 
			
		||||
@@ -109,9 +112,9 @@ describe 'cloud::compute::hypervisor' 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_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/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/libvirt_inject_key').with('value' => false)
 | 
			
		||||
      should contain_nova_config('DEFAULT/libvirt_inject_partition').with('value' => '-2')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user