Add support for allocation_conflict_retry_count

Change-Id: Ie7c4c70caefe07799ca7fa1a1c1dea911a93e010
This commit is contained in:
Takashi Kajinami 2020-05-20 21:41:32 +09:00
parent 7e17c3db09
commit 04800be41f
3 changed files with 15 additions and 0 deletions

View File

@ -17,10 +17,16 @@
# allocation candidates.
# Defaults to $::os_service_default
#
# [*allocation_conflict_retry_count*]
# (Optional) The number of retries when confliction is detected in concurrent
# allocations.
# Defaults to $::os_service_default
#
class placement(
$ensure_package = 'present',
$sync_db = true,
$randomize_allocation_candidates = $::os_service_default,
$allocation_conflict_retry_count = $::os_service_default,
) inherits placement::params {
include placement::deps
@ -44,5 +50,6 @@ class placement(
placement_config {
'placement/randomize_allocation_candidates': value => $randomize_allocation_candidates;
'placement/allocation_conflict_retry_count': value => $allocation_conflict_retry_count;
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
Support for allocation_conflict_retry_count parameter has been added. Use
``placement::allocation_conflict_retry_count`` to set the parameter.

View File

@ -22,6 +22,7 @@ describe 'placement' do
)}
it { should contain_placement_config('placement/randomize_allocation_candidates').with_value('<SERVICE DEFAULT>') }
it { should contain_placement_config('placement/allocation_conflict_retry_count').with_value('<SERVICE DEFAULT>') }
end
context 'with overridden parameters' do
@ -30,6 +31,7 @@ describe 'placement' do
:ensure_package => 'absent',
:sync_db => false,
:randomize_allocation_candidates => true,
:allocation_conflict_retry_count => 10,
}
end
@ -52,6 +54,7 @@ describe 'placement' do
)}
it { should contain_placement_config('placement/randomize_allocation_candidates').with_value(true) }
it { should contain_placement_config('placement/allocation_conflict_retry_count').with_value(10) }
end
end