rbd/nova: fix rbd user
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
parent
2a7d010048
commit
72a3496b14
@ -34,7 +34,7 @@ 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,
|
||||||
$nova_rbd_user = $os_params::nova_rbd_user,
|
$cinder_rbd_user = $os_params::cinder_rbd_user,
|
||||||
$nova_rbd_pool = $os_params::nova_rbd_pool,
|
$nova_rbd_pool = $os_params::nova_rbd_pool,
|
||||||
$nova_rbd_secret_uuid = $os_params::ceph_fsid,
|
$nova_rbd_secret_uuid = $os_params::ceph_fsid,
|
||||||
$has_ceph = false
|
$has_ceph = false
|
||||||
@ -120,7 +120,7 @@ Host *
|
|||||||
'DEFAULT/libvirt_images_type': value => 'rbd';
|
'DEFAULT/libvirt_images_type': value => 'rbd';
|
||||||
'DEFAULT/libvirt_images_rbd_pool': value => $nova_rbd_pool;
|
'DEFAULT/libvirt_images_rbd_pool': value => $nova_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_rbd_user;
|
'DEFAULT/rbd_user': value => $cinder_rbd_user;
|
||||||
'DEFAULT/rbd_secret_uuid': value => $nova_rbd_secret_uuid;
|
'DEFAULT/rbd_secret_uuid': value => $nova_rbd_secret_uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,13 +136,13 @@ Host *
|
|||||||
Exec <<| tag == 'get_or_set_virsh_secret' |>>
|
Exec <<| tag == 'get_or_set_virsh_secret' |>>
|
||||||
Exec <<| tag == 'set_secret_value_virsh' |>>
|
Exec <<| tag == 'set_secret_value_virsh' |>>
|
||||||
|
|
||||||
Ceph::Key <<| title == $nova_rbd_user |>>
|
Ceph::Key <<| title == $cinder_rbd_user |>>
|
||||||
if defined(Ceph::Key[$nova_rbd_user]) {
|
if defined(Ceph::Key[$cinder_rbd_user]) {
|
||||||
file { "/etc/ceph/ceph.client.${nova_rbd_user}.keyring":
|
file { "/etc/ceph/ceph.client.${cinder_rbd_user}.keyring":
|
||||||
owner => 'nova',
|
owner => 'nova',
|
||||||
group => 'nova',
|
group => 'nova',
|
||||||
mode => '0400',
|
mode => '0400',
|
||||||
require => Ceph::Key[$nova_rbd_user]
|
require => Ceph::Key[$cinder_rbd_user]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Concat::Fragment <<| title == 'ceph-client-os' |>>
|
Concat::Fragment <<| title == 'ceph-client-os' |>>
|
||||||
|
@ -19,7 +19,6 @@ class cloud::storage::rbd::pools(
|
|||||||
$glance_rbd_pool = $os_params::glance_rbd_pool,
|
$glance_rbd_pool = $os_params::glance_rbd_pool,
|
||||||
$cinder_rbd_user = $os_params::cinder_rbd_user,
|
$cinder_rbd_user = $os_params::cinder_rbd_user,
|
||||||
$cinder_rbd_pool = $os_params::cinder_rbd_pool,
|
$cinder_rbd_pool = $os_params::cinder_rbd_pool,
|
||||||
$nova_rbd_user = $os_params::nova_rbd_user,
|
|
||||||
$nova_rbd_pool = $os_params::nova_rbd_pool,
|
$nova_rbd_pool = $os_params::nova_rbd_pool,
|
||||||
$pool_default_pg_num = $::ceph::conf::pool_default_pg_num,
|
$pool_default_pg_num = $::ceph::conf::pool_default_pg_num,
|
||||||
$pool_default_pgp_num = $::ceph::conf::pool_default_pgp_num,
|
$pool_default_pgp_num = $::ceph::conf::pool_default_pgp_num,
|
||||||
@ -88,7 +87,7 @@ class cloud::storage::rbd::pools(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$clients = [$glance_rbd_user, $cinder_rbd_user, $nova_rbd_user]
|
$clients = [$glance_rbd_user, $cinder_rbd_user]
|
||||||
@@concat::fragment { 'ceph-clients-os':
|
@@concat::fragment { 'ceph-clients-os':
|
||||||
target => '/etc/ceph/ceph.conf',
|
target => '/etc/ceph/ceph.conf',
|
||||||
order => '95',
|
order => '95',
|
||||||
|
@ -71,7 +71,7 @@ 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,
|
||||||
:nova_rbd_user => 'nova',
|
:cinder_rbd_user => 'cinder',
|
||||||
:nova_rbd_pool => 'nova',
|
:nova_rbd_pool => 'nova',
|
||||||
:nova_rbd_secret_uuid => 'secrete',
|
:nova_rbd_secret_uuid => 'secrete',
|
||||||
:nova_ssh_private_key => 'secrete',
|
:nova_ssh_private_key => 'secrete',
|
||||||
@ -235,7 +235,7 @@ describe 'cloud::compute::hypervisor' 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' => 'nova')
|
||||||
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')
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ describe 'cloud::compute::hypervisor' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should not configure nova-compute for RBD backend' do
|
it 'should not configure nova-compute for RBD backend' do
|
||||||
should_not contain_nova_config('DEFAULT/rbd_user').with('value' => 'nova')
|
should_not contain_nova_config('DEFAULT/rbd_user').with('value' => 'cinder')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user