Deprecated pid_max and remove sysctl module dependency

Change-Id: I39cabf6fc1286c788ba10fc40402db22fdf1652c
This commit is contained in:
Tobias Urdin 2021-12-23 09:45:15 +01:00 committed by Takashi Kajinami
parent 28a866b03c
commit 201e8b16f6
5 changed files with 33 additions and 34 deletions

View File

@ -27,6 +27,8 @@
# [*defaults*] A config hash
# Optional. Defaults to a empty hash
#
# **DEPRECATED PARAMS**
#
# [*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
@ -34,17 +36,15 @@
# http://docs.ceph.com/docs/nautilus/rados/troubleshooting/troubleshooting-osd/
#
class ceph::osds(
$args = {},
$args = {},
$defaults = {},
$pid_max = $ceph::profile::params::pid_max,
)
{
create_resources(ceph::osd, $args, $defaults)
# DEPRECATED PARAMS
$pid_max = undef,
) {
if $pid_max {
$sysctl_settings = {
'kernel.pid_max' => { value => $pid_max },
}
ensure_resources(sysctl::value,$sysctl_settings)
if $pid_max != undef {
warning('pid_max parameter is deprecated and has no effect.')
}
create_resources(ceph::osd, $args, $defaults)
}

View File

@ -137,12 +137,6 @@
# 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/nautilus/rados/troubleshooting/troubleshooting-osd/
#
# [*rgw_keystone_version*] The api version for keystone.
# Possible values 'v2.0', 'v3'
# Optional. Default is 'v2.0'
@ -177,7 +171,14 @@
# [*rbd_default_features*] Set RBD features configuration.
# Optional. String. Defaults to undef.
#
# **DEPRECATED PARAMS**
#
# [*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/nautilus/rados/troubleshooting/troubleshooting-osd/
#
class ceph::profile::params (
$fsid = undef,
$release = undef,
@ -214,7 +215,6 @@ 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,
@ -225,10 +225,16 @@ class ceph::profile::params (
$fs_data_pool = undef,
$fs_name = undef,
$rbd_default_features = undef,
# DEPRECATED PARAMS
$pid_max = undef,
) {
validate_legacy(Hash, 'validate_hash', $client_keys)
if $pid_max != undef {
warning('pid_max parameter is deprecated and has no effect.')
}
if $authentication_type == 'cephx' and empty($client_keys) {
fail("client_keys must be provided when using authentication_type = 'cephx'")
}

View File

@ -63,10 +63,6 @@
"name": "puppetlabs/stdlib",
"version_requirement": ">=5.0.0 <9.0.0"
},
{
"name": "duritong/sysctl",
"version_requirement": ">=0.0.1 <1.0.0"
},
{
"name": "openstack/openstacklib",
"version_requirement": ">=9.0.0"

View File

@ -0,0 +1,9 @@
---
upgrade:
- |
The puppet-ceph module no longer depends on any sysctl module thus the
dependency on duritong/sysctl module is removed and not needed anymore.
deprecations:
- |
The pid_max parameter in classes ceph::osds and ceph::profile::params is
deprecated and no longer used.

View File

@ -43,21 +43,9 @@ describe 'ceph::osds' do
should contain_ceph__osd('/srv/data').with(
:ensure => 'present',
:cluster => 'CLUSTER')
should_not contain_sysctl__value('kernel.pid_max')
}
end
context 'sets pid_max when enabled' do
let :params do
{
:pid_max => 123456,
}
end
it do
should contain_sysctl__value('kernel.pid_max').with_value(123456)
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|