Configure workers for Ceilometer services
Workers option can be set for Ceilometer API, Collector and Agent Notification services. This patch uses upstream commit: https://review.openstack.org/#/c/226011/ Change-Id: I8d12d32959f6970bf555b5182ff49c55249132bc Closes-bug: #1522475
This commit is contained in:
parent
e54d4e1f2e
commit
ae9163dc7b
|
@ -134,7 +134,7 @@ mod 'swift',
|
|||
# Pull in puppet-ceilometer
|
||||
mod 'ceilometer',
|
||||
:git => 'https://review.fuel-infra.org/p/puppet-modules/puppet-ceilometer.git',
|
||||
:ref => '7.0.0-mos-rc2'
|
||||
:ref => '7.0.0-rc3'
|
||||
|
||||
# Pull in openstack-cinder
|
||||
mod 'cinder',
|
||||
|
|
|
@ -44,6 +44,9 @@ class openstack::ceilometer (
|
|||
$event_time_to_live = '604800',
|
||||
$metering_time_to_live = '604800',
|
||||
$http_timeout = '600',
|
||||
$api_workers = '1',
|
||||
$collector_workers = '1',
|
||||
$notification_workers = '1',
|
||||
) {
|
||||
|
||||
# Add the base ceilometer class & parameters
|
||||
|
@ -128,6 +131,7 @@ class openstack::ceilometer (
|
|||
keystone_tenant => $keystone_tenant,
|
||||
host => $host,
|
||||
port => $port,
|
||||
api_workers => $api_workers,
|
||||
}
|
||||
|
||||
# Clean up expired data once a week
|
||||
|
@ -139,7 +143,9 @@ class openstack::ceilometer (
|
|||
weekday => '0',
|
||||
}
|
||||
|
||||
class { '::ceilometer::collector': }
|
||||
class { '::ceilometer::collector':
|
||||
collector_workers => $collector_workers,
|
||||
}
|
||||
|
||||
class { '::ceilometer::agent::central': }
|
||||
|
||||
|
@ -150,6 +156,7 @@ class openstack::ceilometer (
|
|||
class { '::ceilometer::alarm::notifier': }
|
||||
|
||||
class { '::ceilometer::agent::notification':
|
||||
notification_workers => $notification_workers,
|
||||
store_events => true,
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ $rabbit_ha_queues = true
|
|||
$service_endpoint = hiera('service_endpoint')
|
||||
$ha_mode = pick($ceilometer_hash['ha_mode'], true)
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
$service_workers = pick($ceilometer_hash['workers'], min(max($::processorcount, 2), 16))
|
||||
|
||||
prepare_network_config(hiera('network_scheme', {}))
|
||||
$api_bind_address = get_network_role_property('ceilometer/api', 'ipaddr')
|
||||
|
@ -118,5 +119,8 @@ if ($ceilometer_enabled) {
|
|||
event_time_to_live => $ceilometer_hash['event_time_to_live'],
|
||||
metering_time_to_live => $ceilometer_hash['metering_time_to_live'],
|
||||
http_timeout => $ceilometer_hash['http_timeout'],
|
||||
api_workers => $service_workers,
|
||||
collector_workers => $service_workers,
|
||||
notification_workers => $service_workers,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,14 @@ describe manifest do
|
|||
shared_examples 'catalog' do
|
||||
|
||||
# TODO All this stuff should be moved to shared examples controller* tests.
|
||||
let(:facts) {
|
||||
Noop.ubuntu_facts.merge({
|
||||
:processorcount => '6'
|
||||
})
|
||||
}
|
||||
let(:processorcount) do
|
||||
6
|
||||
end
|
||||
|
||||
rabbit_user = Noop.hiera_structure 'rabbit/user', 'nova'
|
||||
rabbit_password = Noop.hiera_structure 'rabbit/password'
|
||||
|
@ -46,6 +54,15 @@ describe manifest do
|
|||
it 'should configure default log levels' do
|
||||
should contain_ceilometer_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
|
||||
it 'should configure workers for API, Collector and Agent Notification services' do
|
||||
fallback_workers = [[processorcount, 2].max, 16].min
|
||||
service_workers = Noop.puppet_function 'pick', ceilometer_hash['workers'], fallback_workers
|
||||
|
||||
should contain_ceilometer_config('DEFAULT/api_workers').with(:value => service_workers)
|
||||
should contain_ceilometer_config('DEFAULT/collector_workers').with(:value => service_workers)
|
||||
should contain_ceilometer_config('DEFAULT/notification_workers').with(:value => service_workers)
|
||||
end
|
||||
end
|
||||
|
||||
end # end of shared_examples
|
||||
|
|
Loading…
Reference in New Issue