Remove deprecated ceph::set_osd_params

It was added as a deprecated parameter a long ago.

Change-Id: I29ef2981c69e24429014026a051fe8aff266efc7
This commit is contained in:
Takashi Kajinami 2023-07-23 02:24:22 +09:00
parent 843fa12939
commit e82583f39e
3 changed files with 33 additions and 41 deletions

View File

@ -134,12 +134,6 @@
# [*rbd_default_features*] Set RBD features configuration. # [*rbd_default_features*] Set RBD features configuration.
# Optional. String. Defaults to undef. # Optional. String. Defaults to undef.
# #
# DEPRECATED PARAMETERS
#
# [*set_osd_params*] disables setting osd params using this module by default as people
# calling ceph_config from in-house modules will get dup-declaration errors.
# Boolean. Default false.
#
class ceph ( class ceph (
$fsid, $fsid,
$ensure = present, $ensure = present,
@ -174,17 +168,10 @@ class ceph (
$osd_max_scrubs = undef, $osd_max_scrubs = undef,
$osd_op_threads = undef, $osd_op_threads = undef,
$rbd_default_features = undef, $rbd_default_features = undef,
# DEPRECATED PARAMETERS
$set_osd_params = false,
) { ) {
include ceph::params include ceph::params
if $set_osd_params {
warning('set_osd_params is deprecated. It is here to allow a transition to using \
this module to assign values and will be removed in a future release.')
}
package { $ceph::params::packages : package { $ceph::params::packages :
ensure => $ensure, ensure => $ensure,
tag => 'ceph' tag => 'ceph'
@ -219,6 +206,12 @@ this module to assign values and will be removed in a future release.')
'global/public_network': value => $public_network; 'global/public_network': value => $public_network;
'global/public_addr': value => $public_addr; 'global/public_addr': value => $public_addr;
'osd/osd_journal_size': value => $osd_journal_size; 'osd/osd_journal_size': value => $osd_journal_size;
'osd/osd_max_backfills': value => $osd_max_backfills;
'osd/osd_recovery_max_active': value => $osd_recovery_max_active;
'osd/osd_recovery_op_priority': value => $osd_recovery_op_priority;
'osd/osd_recovery_max_single_start': value => $osd_recovery_max_single_start;
'osd/osd_max_scrubs': value => $osd_max_scrubs;
'osd/osd_op_threads': value => $osd_op_threads;
'client/rbd_default_features': value => $rbd_default_features; 'client/rbd_default_features': value => $rbd_default_features;
} }
@ -237,17 +230,5 @@ this module to assign values and will be removed in a future release.')
'global/auth_supported': value => 'none'; 'global/auth_supported': value => 'none';
} }
} }
# This section will be moved up with the rest of the non-auth settings in the next release and the set_osd_params flag will be removed
if $set_osd_params {
ceph_config {
'osd/osd_max_backfills': value => $osd_max_backfills;
'osd/osd_recovery_max_active': value => $osd_recovery_max_active;
'osd/osd_recovery_op_priority': value => $osd_recovery_op_priority;
'osd/osd_recovery_max_single_start': value => $osd_recovery_max_single_start;
'osd/osd_max_scrubs': value => $osd_max_scrubs;
'osd/osd_op_threads': value => $osd_op_threads;
}
}
} }
} }

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
The ``ceph::set_osd_params`` parameter has been removed. Now the ``ceph``
class manages ods options.

View File

@ -27,8 +27,9 @@ describe 'ceph' do
end end
it { should contain_package('ceph').with( it { should contain_package('ceph').with(
'name' => 'ceph', 'name' => 'ceph',
'ensure' => 'present') } 'ensure' => 'present'
)}
it { should contain_ceph_config('global/fsid').with_value('d5252e7d-75bc-4083-85ed-fe51fa83f62b') } it { should contain_ceph_config('global/fsid').with_value('d5252e7d-75bc-4083-85ed-fe51fa83f62b') }
it { should_not contain_ceph_config('global/keyring').with_value('/etc/ceph/keyring') } it { should_not contain_ceph_config('global/keyring').with_value('/etc/ceph/keyring') }
@ -52,7 +53,13 @@ describe 'ceph' do
it { should_not contain_ceph_config('global/public_network').with_value('192.168.0.0/24') } it { should_not contain_ceph_config('global/public_network').with_value('192.168.0.0/24') }
it { should_not contain_ceph_config('global/public_addr').with_value('192.168.0.2') } it { should_not contain_ceph_config('global/public_addr').with_value('192.168.0.2') }
it { should_not contain_ceph_config('osd/osd_journal_size').with_value('4096') } it { should_not contain_ceph_config('osd/osd_journal_size').with_value('4096') }
it { should_not contain_ceph_config('client/rbd_default_features').with_value('15') } it { should_not contain_ceph_config('osd/osd_max_backfills').with_value('2') }
it { should_not contain_ceph_config('osd/osd_recovery_max_active').with_value('2') }
it { should_not contain_ceph_config('osd/osd_recovery_op_priority').with_value('2') }
it { should_not contain_ceph_config('osd/osd_recovery_max_single_start').with_value('2') }
it { should_not contain_ceph_config('osd/osd_max_scrubs').with_value('2') }
it { should_not contain_ceph_config('osd/osd_op_threads').with_value('4') }
it { should_not contain_ceph_config('client/rbd_default_features').with_value('12') }
it { should contain_ceph_config('global/auth_cluster_required').with_value('cephx') } it { should contain_ceph_config('global/auth_cluster_required').with_value('cephx') }
it { should contain_ceph_config('global/auth_service_required').with_value('cephx') } it { should contain_ceph_config('global/auth_service_required').with_value('cephx') }
it { should contain_ceph_config('global/auth_client_required').with_value('cephx') } it { should contain_ceph_config('global/auth_client_required').with_value('cephx') }
@ -91,13 +98,12 @@ describe 'ceph' do
:cluster_network => '10.0.0.0/24', :cluster_network => '10.0.0.0/24',
:public_network => '192.168.0.0/24', :public_network => '192.168.0.0/24',
:public_addr => '192.168.0.2', :public_addr => '192.168.0.2',
:set_osd_params => 'true', :osd_max_backfills => '2',
:osd_max_backfills => '1', :osd_recovery_max_active => '2',
:osd_recovery_max_active => '1', :osd_recovery_op_priority => '2',
:osd_recovery_op_priority => '1', :osd_recovery_max_single_start => '2',
:osd_recovery_max_single_start => '1', :osd_max_scrubs => '2',
:osd_max_scrubs => '1', :osd_op_threads => '4',
:osd_op_threads => '2',
:rbd_default_features => '12', :rbd_default_features => '12',
} }
end end
@ -139,12 +145,12 @@ describe 'ceph' do
it { should contain_ceph_config('global/auth_service_required').with_value('none') } it { should contain_ceph_config('global/auth_service_required').with_value('none') }
it { should contain_ceph_config('global/auth_client_required').with_value('none') } it { should contain_ceph_config('global/auth_client_required').with_value('none') }
it { should contain_ceph_config('global/auth_supported').with_value('none') } it { should contain_ceph_config('global/auth_supported').with_value('none') }
it { should contain_ceph_config('osd/osd_max_backfills').with_value('1') } it { should contain_ceph_config('osd/osd_max_backfills').with_value('2') }
it { should contain_ceph_config('osd/osd_recovery_max_active').with_value('1') } it { should contain_ceph_config('osd/osd_recovery_max_active').with_value('2') }
it { should contain_ceph_config('osd/osd_recovery_op_priority').with_value('1') } it { should contain_ceph_config('osd/osd_recovery_op_priority').with_value('2') }
it { should contain_ceph_config('osd/osd_recovery_max_single_start').with_value('1') } it { should contain_ceph_config('osd/osd_recovery_max_single_start').with_value('2') }
it { should contain_ceph_config('osd/osd_max_scrubs').with_value('1') } it { should contain_ceph_config('osd/osd_max_scrubs').with_value('2') }
it { should contain_ceph_config('osd/osd_op_threads').with_value('2') } it { should contain_ceph_config('osd/osd_op_threads').with_value('4') }
end end
end end