Add workers support to octavia::worker class
Adds a new workers parameter that sets the amount of workers for the octavia worker daemon. Change-Id: I52f052ddc757418a5a98fc4b9b8ccf31defde0c4
This commit is contained in:
parent
54c9e53a27
commit
7d6badaac8
@ -14,6 +14,10 @@
|
||||
# (optional) ensure state for package.
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*workers*]
|
||||
# (optional) Number of worker processes.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*amp_flavor_id*]
|
||||
# (optional) Nova instance flavor id for the Amphora.
|
||||
# Note: since we set manage_nova_flavor to True by default, we need
|
||||
@ -88,6 +92,7 @@ class octavia::worker (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$workers = $::os_service_default,
|
||||
$amp_flavor_id = '65',
|
||||
$amp_image_tag = $::os_service_default,
|
||||
$amp_secgroup_list = $::os_service_default,
|
||||
@ -207,6 +212,7 @@ class octavia::worker (
|
||||
}
|
||||
|
||||
octavia_config {
|
||||
'controller_worker/workers' : value => $workers;
|
||||
'controller_worker/amp_flavor_id' : value => $amp_flavor_id;
|
||||
'controller_worker/amp_image_tag' : value => $amp_image_tag;
|
||||
'controller_worker/amp_secgroup_list' : value => $amp_secgroup_list;
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added new parameter octavia::worker::workers that can be used to set the
|
||||
number of worker processes.
|
@ -27,6 +27,7 @@ describe 'octavia::worker' do
|
||||
context 'configured with specific parameters' do
|
||||
before do
|
||||
params.merge!({
|
||||
:workers => 8,
|
||||
:amp_flavor_id => '42',
|
||||
:amp_image_tag => 'amphorae1',
|
||||
:amp_secgroup_list => ['lb-mgmt-sec-grp'],
|
||||
@ -43,6 +44,7 @@ describe 'octavia::worker' do
|
||||
})
|
||||
end
|
||||
|
||||
it { is_expected.to contain_octavia_config('controller_worker/workers').with_value(8) }
|
||||
it { is_expected.to contain_octavia_config('controller_worker/amp_flavor_id').with_value('42') }
|
||||
it { is_expected.to contain_octavia_config('controller_worker/amp_image_tag').with_value('amphorae1') }
|
||||
it { is_expected.to contain_octavia_config('controller_worker/amp_secgroup_list').with_value(['lb-mgmt-sec-grp']) }
|
||||
@ -65,6 +67,7 @@ describe 'octavia::worker' do
|
||||
end
|
||||
|
||||
it 'configures worker parameters' do
|
||||
is_expected.to contain_octavia_config('controller_worker/workers').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_octavia_config('controller_worker/amp_flavor_id').with_value('65')
|
||||
is_expected.to contain_octavia_config('controller_worker/amphora_driver').with_value('amphora_haproxy_rest_driver')
|
||||
is_expected.to contain_octavia_config('controller_worker/compute_driver').with_value('compute_nova_driver')
|
||||
|
Loading…
Reference in New Issue
Block a user