Error when using ceilometer collector
cloudkitty-processor service error[1] when using ceilometer collector. Because the ceilometer collector has been removed in cloudkitty repo[2]. [1]http://logs.openstack.org/21/555121/1/check/puppet-openstack-beaker-centos-7/404b6ea/logs/cloudkitty/processor.txt.gz#_2018-03-22_04_39_53_481 [2]https://review.openstack.org/#/c/548630/ Change-Id: Ibb3b13ab4a2342ee551343247e79f084678d3887 Closes-Bug: #1757945
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
# [*collector*]
|
# [*collector*]
|
||||||
# (Optional) Data collector.
|
# (Optional) Data collector.
|
||||||
# Defaults to 'ceilometer'.
|
# Defaults to 'gnocchi'.
|
||||||
#
|
#
|
||||||
# [*window*]
|
# [*window*]
|
||||||
# (Optional) Number of samples to collect per call.
|
# (Optional) Number of samples to collect per call.
|
||||||
@@ -48,7 +48,7 @@ class cloudkitty::processor (
|
|||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$collector = 'ceilometer',
|
$collector = 'gnocchi',
|
||||||
$window = $::os_service_default,
|
$window = $::os_service_default,
|
||||||
$period = $::os_service_default,
|
$period = $::os_service_default,
|
||||||
$wait_periods = $::os_service_default,
|
$wait_periods = $::os_service_default,
|
||||||
@@ -90,30 +90,15 @@ class cloudkitty::processor (
|
|||||||
'collect/services': value => $services;
|
'collect/services': value => $services;
|
||||||
}
|
}
|
||||||
|
|
||||||
if $collector == 'ceilometer' {
|
if $collector != 'gnocchi' {
|
||||||
cloudkitty_config{
|
warning('Valid value of the collector option is gnocchi')
|
||||||
'ceilometer_collector/auth_type': value => $auth_type;
|
$collector = 'gnocchi'
|
||||||
'ceilometer_collector/auth_section': value => $auth_section
|
|
||||||
}
|
|
||||||
cloudkitty_config {
|
|
||||||
'gnocchi_collector/auth_type': ensure => absent;
|
|
||||||
'gnocchi_collector/auth_section': ensure => absent;
|
|
||||||
}
|
|
||||||
$collector_real = $collector
|
|
||||||
} else{
|
|
||||||
warning('Valid values of the collector option are ceilometer and gnocchi')
|
|
||||||
cloudkitty_config{
|
|
||||||
'gnocchi_collector/auth_type': value => $auth_type;
|
|
||||||
'gnocchi_collector/auth_section': value => $auth_section;
|
|
||||||
}
|
|
||||||
cloudkitty_config {
|
|
||||||
'ceilometer_collector/auth_type': ensure => absent;
|
|
||||||
'ceilometer_collector/auth_section': ensure => absent;
|
|
||||||
}
|
|
||||||
$collector_real = 'gnocchi'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cloudkitty_config {
|
cloudkitty_config {
|
||||||
'collect/collector': value => $collector_real;
|
'collect/collector': value => $collector;
|
||||||
|
'gnocchi_collector/auth_type': value => $auth_type;
|
||||||
|
'gnocchi_collector/auth_section': value => $auth_section
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
other:
|
||||||
|
- Change default value from 'ceilometer' to 'gnocchi' for collector option in
|
||||||
|
::cloudkitty::processer class. Because the ceilometer collector has been
|
||||||
|
removed in cloudkitty repo.
|
@@ -5,7 +5,7 @@ describe 'cloudkitty::processor' do
|
|||||||
let :params do
|
let :params do
|
||||||
{ :enabled => true,
|
{ :enabled => true,
|
||||||
:manage_service => true,
|
:manage_service => true,
|
||||||
:collector => 'ceilometer',
|
:collector => 'gnocchi',
|
||||||
:period => '60',
|
:period => '60',
|
||||||
:wait_periods => '1',
|
:wait_periods => '1',
|
||||||
:window => '3600',}
|
:window => '3600',}
|
||||||
@@ -21,10 +21,8 @@ describe 'cloudkitty::processor' do
|
|||||||
it { is_expected.to contain_cloudkitty_config('collect/window').with_value( params[:window] ) }
|
it { is_expected.to contain_cloudkitty_config('collect/window').with_value( params[:window] ) }
|
||||||
it { is_expected.to contain_cloudkitty_config('collect/period').with_value( params[:period] ) }
|
it { is_expected.to contain_cloudkitty_config('collect/period').with_value( params[:period] ) }
|
||||||
it { is_expected.to contain_cloudkitty_config('collect/wait_periods').with_value( params[:wait_periods] ) }
|
it { is_expected.to contain_cloudkitty_config('collect/wait_periods').with_value( params[:wait_periods] ) }
|
||||||
it { is_expected.to contain_cloudkitty_config('ceilometer_collector/auth_type').with_value('password') }
|
it { is_expected.to contain_cloudkitty_config('gnocchi_collector/auth_type').with_value('password') }
|
||||||
it { is_expected.to contain_cloudkitty_config('ceilometer_collector/auth_section').with_value('keystone_authtoken') }
|
it { is_expected.to contain_cloudkitty_config('gnocchi_collector/auth_section').with_value('keystone_authtoken') }
|
||||||
it { is_expected.to contain_cloudkitty_config('gnocchi_collector/auth_type').with_ensure('absent') }
|
|
||||||
it { is_expected.to contain_cloudkitty_config('gnocchi_collector/auth_section').with_ensure('absent') }
|
|
||||||
|
|
||||||
it 'installs cloudkitty-processor package' do
|
it 'installs cloudkitty-processor package' do
|
||||||
is_expected.to contain_package('cloudkitty-processor').with(
|
is_expected.to contain_package('cloudkitty-processor').with(
|
||||||
@@ -47,20 +45,6 @@ describe 'cloudkitty::processor' do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with gnocchi backend' do
|
|
||||||
before do
|
|
||||||
params.merge!({
|
|
||||||
:collector => 'gnocchi',
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
it { is_expected.to contain_cloudkitty_config('collect/collector').with_value( params[:collector] ) }
|
|
||||||
it { is_expected.to contain_cloudkitty_config('gnocchi_collector/auth_type').with_value('password') }
|
|
||||||
it { is_expected.to contain_cloudkitty_config('gnocchi_collector/auth_section').with_value('keystone_authtoken') }
|
|
||||||
it { is_expected.to contain_cloudkitty_config('ceilometer_collector/auth_type').with_ensure('absent') }
|
|
||||||
it { is_expected.to contain_cloudkitty_config('ceilometer_collector/auth_section').with_ensure('absent') }
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when disabled' do
|
context 'when disabled' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :enabled => false }
|
{ :enabled => false }
|
||||||
|
Reference in New Issue
Block a user