Make pid_max settable on OSD nodes.

On OSD nodes during recovery you can ovewhelm the default PID max of
32k. The docs recommend setting to the largest possible value, 4194303.
By default this will not be set.

http://docs.ceph.com/docs/jewel/rados/troubleshooting/troubleshooting-osd/

Change-Id: Id7714e8d237db2137fdc32002ab7ae373fb81357
Closes-Bug: #1362825
This commit is contained in:
Matt Fischer 2016-09-23 21:56:27 -06:00 committed by Alex Schultz
parent 939307f497
commit 7c9e77906e
5 changed files with 49 additions and 3 deletions

View File

@ -27,6 +27,24 @@
# [*defaults*] A config hash
# Optional. Defaults to a empty hash
#
class ceph::osds($args = {}, $defaults = {}) {
# [*pid_max*] Value for pid_max. Defaults to undef. Optional.
# For OSD nodes it is recommended that you raise pid_max above the
# default value because you may hit the system max during
# recovery. The recommended value is the absolute max for pid_max: 4194303
# http://docs.ceph.com/docs/jewel/rados/troubleshooting/troubleshooting-osd/
#
class ceph::osds(
$args = {},
$defaults = {},
$pid_max = $::ceph::profile::params::pid_max,
)
{
create_resources(ceph::osd, $args, $defaults)
if $pid_max {
$sysctl_settings = {
'kernel.pid_max' => { value => $pid_max },
}
ensure_resources(sysctl::value,$sysctl_settings)
}
}

View File

@ -145,6 +145,12 @@
# Set to 0 to disable it.
# Optional. Default provided by Ceph
#
# [*pid_max*] Value for pid_max. Defaults to undef. Optional.
# For OSD nodes it is recommended that you raise pid_max above the
# default value because you may hit the system max during
# recovery. The recommended value is the absolute max for pid_max: 4194303
# http://docs.ceph.com/docs/jewel/rados/troubleshooting/troubleshooting-osd/
#
# [*rgw_keystone_version*] The api version for keystone.
# Possible values 'v2.0', 'v3'
# Optional. Default is 'v2.0'
@ -199,6 +205,7 @@ class ceph::profile::params (
$osd_recovery_max_single_start = undef,
$osd_max_scrubs = undef,
$osd_op_threads = undef,
$pid_max = undef,
$rgw_keystone_version = 'v2.0',
$rgw_keystone_admin_domain = undef,
$rgw_keystone_admin_project = undef,

View File

@ -66,6 +66,10 @@
{
"name": "puppetlabs/stdlib",
"version_requirement": ">=4.10.0 <5.0.0"
},
{
"name": "duritong/sysctl",
"version_requirement": ">=0.0.1 <1.0.0"
}
]
}

View File

@ -0,0 +1,6 @@
---
features:
- On OSD nodes you can run out of PIDs during a recovery.
Therefore it is recommended that you raise pid_max. This
change makes that possible with an enablement flag and
the ability to set the value.

View File

@ -39,14 +39,25 @@ describe 'ceph::osds' do
is_expected.to contain_ceph__osd('/dev/sdb').with(
:ensure => 'present',
:journal => '/srv/journal',
:cluster => 'CLUSTER'
)
:cluster => 'CLUSTER')
is_expected.to contain_ceph__osd('/srv/data').with(
:ensure => 'present',
:cluster => 'CLUSTER')
is_expected.not_to contain_sysctl__value('kernel.pid_max')
}
end
context 'sets pid_max when enabled' do
let :params do
{
:pid_max => 123456,
}
end
it do
is_expected.to contain_sysctl__value('kernel.pid_max').with_value(123456)
end
end
describe 'Ubuntu' do
let :facts do
{