fuel-library/deployment/puppet/ceph/manifests/nova_compute.pp
Maksim Malchuk 2cec77da86 Increase kernel.pid_max value for ceph-osd nodes
To meet Ceph requirements and eliminate accidental cascade
OSD node failures this commit increases kernel.pid_max
parameter during deploy ceph-osd nodes. Also this commit
contain some puppet-lint cleanups and validations for this
module.

Change-Id: I70a64ff7b85229bf0760be266302d9b32039989a
Closes-Bug: #1536271
Closes-Bug: #1537084
2016-01-25 00:00:53 +03:00

36 lines
1.0 KiB
Puppet

# configure the nova_compute parts if present
class ceph::nova_compute (
$rbd_secret_uuid = $::ceph::rbd_secret_uuid,
$user = $::ceph::compute_user,
$compute_pool = $::ceph::compute_pool,
) {
file {'/root/secret.xml':
content => template('ceph/secret.erb')
}
if !defined(Service['libvirt'] ) {
service { 'libvirt':
ensure => 'running',
name => $::ceph::params::libvirt_service_name,
}
}
exec {'Set Ceph RBD secret for Nova':
# TODO: clean this command up
command => "virsh secret-set-value --secret $( \
virsh secret-define --file /root/secret.xml | \
egrep -o '[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}') \
--base64 $(ceph auth get-key client.${user}) && \
rm /root/secret.xml",
}
nova_config {
'libvirt/rbd_secret_uuid': value => $rbd_secret_uuid;
'libvirt/rbd_user': value => $user;
}
File['/root/secret.xml'] ->
Service['libvirt'] -> Exec['Set Ceph RBD secret for Nova']
}