Browse Source

Add support to set host param

Lets expose this param so we can override the host param in
ceilometer config. Without this, some metrics from nova wont
make it as in some cases the fqdn might not match hostname.

Partial-bug: #1721054

Change-Id: I421a61dc31bd10fec0a10bf7e867001cf4dd3f02
changes/80/509180/9
Pradeep Kilambi 5 years ago
parent
commit
4a249ae38c
  1. 8
      manifests/init.pp
  2. 5
      releasenotes/notes/set-ceilometer-host-1e3d3f9de3642cd0.yaml
  3. 5
      spec/classes/ceilometer_init_spec.rb

8
manifests/init.pp

@ -217,6 +217,12 @@
# in the ceilometer config.
# Defaults to false.
#
# [*host*]
# (Optional) Name of this node. This is typically a hostname, FQDN, or
# IP address.
# Defaults to $::os_service_default.
#
#
# === DEPRECATED PARAMETERS:
# [*metering_secret*]
# (optional) Secret key for signing messages.
@ -310,6 +316,7 @@ class ceilometer(
$snmpd_readonly_username = $::os_service_default,
$snmpd_readonly_user_password = $::os_service_default,
$purge_config = false,
$host = $::os_service_default,
# DEPRECATED PARAMETERS
$alarm_history_time_to_live = undef,
$metering_secret = undef,
@ -435,6 +442,7 @@ please use memcache_servers instead.")
# Once we got here, we can act as an honey badger on the rpc used.
ceilometer_config {
'DEFAULT/http_timeout' : value => $http_timeout;
'DEFAULT/host' : value => $host;
'publisher/telemetry_secret' : value => $telemetry_secret_real, secret => true;
'database/event_time_to_live' : value => $event_time_to_live;
'database/metering_time_to_live' : value => $metering_time_to_live;

5
releasenotes/notes/set-ceilometer-host-1e3d3f9de3642cd0.yaml

@ -0,0 +1,5 @@
---
fixes:
- |
Add support to override host param in ceilometer config. Without this
sometimes fqdn wont match and some nova metrics will be skipped.

5
spec/classes/ceilometer_init_spec.rb

@ -13,6 +13,7 @@ describe 'ceilometer' do
:log_dir => '/var/log/ceilometer',
:use_stderr => 'True',
:purge_config => false,
:host => 'foo.domain'
}
end
@ -37,6 +38,10 @@ describe 'ceilometer' do
is_expected.to contain_ceilometer_config('DEFAULT/http_timeout').with_value(params[:http_timeout])
end
it 'configures host name' do
is_expected.to contain_ceilometer_config('DEFAULT/host').with_value(params[:host])
end
context 'with rabbit_host parameter' do
before { params.merge!( rabbit_params ) }
it_configures 'a ceilometer base installation'

Loading…
Cancel
Save