From 92130ddbccf34e81dc14e7c738500884dc13ac37 Mon Sep 17 00:00:00 2001 From: Maksim Malchuk Date: Thu, 21 Jan 2016 20:28:45 +0300 Subject: [PATCH] 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 (cherry-picked from commit 2cec77da86f2148a9e256bd46d58aaad2de874ea) Closes-Bug: #1536271 Closes-Bug: #1537084 --- deployment/puppet/ceph/manifests/init.pp | 19 +++++++++++++++---- deployment/puppet/ceph/manifests/keystone.pp | 2 +- .../puppet/ceph/manifests/nova_compute.pp | 2 +- deployment/puppet/ceph/manifests/radosgw.pp | 8 ++++---- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/deployment/puppet/ceph/manifests/init.pp b/deployment/puppet/ceph/manifests/init.pp index a106761ab4..e15cd70dfe 100644 --- a/deployment/puppet/ceph/manifests/init.pp +++ b/deployment/puppet/ceph/manifests/init.pp @@ -3,8 +3,8 @@ class ceph ( # General settings - $mon_hosts, - $mon_ip_addresses, + $mon_hosts = undef, + $mon_ip_addresses = undef, $cluster_node_address = $::ipaddress, # This should be the cluster service address $primary_mon = $::hostname, # This should be the first controller $mon_addr = $::ipaddress, # This needs to be replaced with the address we want to bind the mon to (if this is a mon) @@ -91,8 +91,12 @@ class ceph ( cwd => '/root', } + # the regex includes all roles that require ceph.conf if hiera('role') =~ /controller|ceph|compute|cinder/ { - # the regex above includes all roles that require ceph.conf + + validate_array($mon_hosts) + validate_array($mon_ip_addresses) + include ceph::ssh include ceph::params include ceph::conf @@ -101,8 +105,8 @@ class ceph ( if hiera('role') =~ /controller|ceph/ { service {'ceph': - name => $ceph::params::service_name, ensure => 'running', + name => $ceph::params::service_name, enable => true, require => Class['ceph::conf'] } @@ -135,6 +139,13 @@ class ceph ( include ceph::osds Class['ceph::conf'] -> Class['ceph::osds'] Ceph_conf <||> ~> Service['ceph'] + + # set the recommended value according: http://tracker.ceph.com/issues/10988 + sysctl::value { 'kernel.pid_max': + value => '4194303', + } + + Sysctl::Value <| |> -> Service['ceph'] } } diff --git a/deployment/puppet/ceph/manifests/keystone.pp b/deployment/puppet/ceph/manifests/keystone.pp index 12530fa5df..5935beac62 100644 --- a/deployment/puppet/ceph/manifests/keystone.pp +++ b/deployment/puppet/ceph/manifests/keystone.pp @@ -13,7 +13,7 @@ class ceph::keystone ( description => 'Openstack Object-Store Service', } - keystone_endpoint {"$region/swift": + keystone_endpoint {"${region}/swift": ensure => present, public_url => "${pub_protocol}://${pub_ip}:${swift_endpoint_port}/swift/v1", admin_url => "http://${adm_ip}:${swift_endpoint_port}/swift/v1", diff --git a/deployment/puppet/ceph/manifests/nova_compute.pp b/deployment/puppet/ceph/manifests/nova_compute.pp index 48705b1be5..36134edf18 100644 --- a/deployment/puppet/ceph/manifests/nova_compute.pp +++ b/deployment/puppet/ceph/manifests/nova_compute.pp @@ -11,8 +11,8 @@ class ceph::nova_compute ( if !defined(Service['libvirt'] ) { service { 'libvirt': - name => $::ceph::params::libvirt_service_name, ensure => 'running', + name => $::ceph::params::libvirt_service_name, } } diff --git a/deployment/puppet/ceph/manifests/radosgw.pp b/deployment/puppet/ceph/manifests/radosgw.pp index e122b3573d..743884e079 100644 --- a/deployment/puppet/ceph/manifests/radosgw.pp +++ b/deployment/puppet/ceph/manifests/radosgw.pp @@ -56,11 +56,11 @@ class ceph::radosgw ( ensure => 'installed', } - if !(defined('horizon') or - defined($::ceph::params::package_httpd) or - defined($::ceph::params::service_httpd) ) { - package {$::ceph::params::package_httpd: + # check out httpd package/service is defined + if !defined(Package['httpd']) { + package { 'httpd': ensure => 'installed', + name => $::ceph::params::package_httpd, } service { 'httpd': ensure => 'running',