Enabling this parameter will identify user and project
names from the polled metrics [1].
These details are collected by making additional requests
to keystone service, depending upon the scale of environment,
number of projects/users and the count of metrics polled in
every iteration, enabling this could overwhelm the keystone
service.
[1] Iee5dbf09a1fd3ac571746fc66d2683eb8e6a1b27
Conflicts:
manifests/agent/polling.pp
Depends-On: https://review.opendev.org/880505
Signed-off-by: Yadnesh Kulkarni <ykulkarn@redhat.com>
Change-Id: I045c7cd7a86d0f7f97a9078cbfc74353dcff0eb8
(cherry picked from commit
b00000fb86e2882c11fb399d9adf410812a895bd)
(cherry picked from commit
9d54bcd658b659758db3c79887e42222368c9f44)
# (Optional) Batch size of samples to send to notification agent.
# Defaults to $::os_service_default
#
+# [*tenant_name_discovery*]
+# (optional) Identify user and project names from polled metrics.
+# Defaults to $::os_service_default.
+#
# DEPRECATED PARAMETERS
#
# [*coordination_url*]
$polling_meters = $::ceilometer::params::polling_meters,
$polling_config = undef,
$batch_size = $::os_service_default,
+ $tenant_name_discovery = $::os_service_default,
# DEPRECATED PARAMETERS
$coordination_url = undef,
) inherits ceilometer {
if $central_namespace {
$central_namespace_name = 'central'
+ ceilometer_config {
+ # set `tenant_name_discovery` parameter only on the nodes
+ # where central namespace is enabled
+ 'DEFAULT/tenant_name_discovery': value => $tenant_name_discovery;
+ }
} else {
$central_namespace_name = undef
+ ceilometer_config {
+ 'DEFAULT/tenant_name_discovery': ensure => absent;
+ }
}
if $compute_namespace {
--- /dev/null
+---
+features:
+ - |
+ Add new parameter ``tenant_name_discovery``, whether to
+ idenitfy user and project names from polled samples.
+ This paramater is to be configured only when ceilometer
+ central namespace is enabled.
)}
it {
+ should contain_ceilometer_config('DEFAULT/tenant_name_discovery').with_value('<SERVICE DEFAULT>')
should contain_ceilometer_config('compute/instance_discovery_method').with_value('<SERVICE DEFAULT>')
should contain_ceilometer_config('compute/resource_update_interval').with_value('<SERVICE DEFAULT>')
should contain_ceilometer_config('compute/resource_cache_expiry').with_value('<SERVICE DEFAULT>')
}
end
+ context 'with central parameters set' do
+ before do
+ params.merge!(
+ :tenant_name_discovery => false
+ )
+ end
+
+ it {
+ should contain_ceilometer_config('DEFAULT/tenant_name_discovery').with_value(false)
+ }
+ end
+
context 'with compute namespace disabled' do
before do
params.merge!(
}
end
+ context 'with central namespace disabled' do
+ before do
+ params.merge!(
+ :central_namespace => false,
+ )
+ end
+
+ it {
+ should contain_ceilometer_config('DEFAULT/polling_namespaces').with_value('compute,ipmi')
+ should contain_ceilometer_config('DEFAULT/tenant_name_discovery').with_ensure('absent')
+ }
+ end
+
context 'with central and ipmi polling namespaces disabled' do
before do
params.merge!(