From 4e576d3f5393cb58b2d19b940d9a3c3d81144417 Mon Sep 17 00:00:00 2001 From: "Matthew J. Black" Date: Fri, 23 Sep 2016 19:27:04 -0400 Subject: [PATCH] Remove blank values in namespaces array. The inline template is using compact which is not removing the blank values. A call to delete function from stdlib is needed to remove the blank values. Change-Id: I7cf3ca383572d569a7e89431dcc39385605cf820 --- manifests/agent/polling.pp | 2 +- .../notes/fix_polling_agent_namespaces-6a79b7e42601f950.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix_polling_agent_namespaces-6a79b7e42601f950.yaml diff --git a/manifests/agent/polling.pp b/manifests/agent/polling.pp index e2d786c1..f98391d7 100644 --- a/manifests/agent/polling.pp +++ b/manifests/agent/polling.pp @@ -78,7 +78,7 @@ class ceilometer::agent::polling ( } } - $namespaces = [$central_namespace_name, $compute_namespace_name, $ipmi_namespace_name] + $namespaces = delete([$central_namespace_name, $compute_namespace_name, $ipmi_namespace_name], '') $namespaces_real = inline_template('<%= @namespaces.select { |x| x and x !~ /^undef/ }.compact.join "," %>') package { 'ceilometer-polling': diff --git a/releasenotes/notes/fix_polling_agent_namespaces-6a79b7e42601f950.yaml b/releasenotes/notes/fix_polling_agent_namespaces-6a79b7e42601f950.yaml new file mode 100644 index 00000000..c14a0f01 --- /dev/null +++ b/releasenotes/notes/fix_polling_agent_namespaces-6a79b7e42601f950.yaml @@ -0,0 +1,3 @@ +--- +issues: + - Delete blank values from ceilometer::agent::polling namespaces array.