aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/ceilometer
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/ceilometer')
-rw-r--r--manifests/profile/base/ceilometer/api.pp7
-rw-r--r--manifests/profile/base/ceilometer/collector.pp15
2 files changed, 8 insertions, 14 deletions
diff --git a/manifests/profile/base/ceilometer/api.pp b/manifests/profile/base/ceilometer/api.pp
index 6ef4748..2e7986b 100644
--- a/manifests/profile/base/ceilometer/api.pp
+++ b/manifests/profile/base/ceilometer/api.pp
@@ -18,6 +18,10 @@
#
# === Parameters
#
+# [*enable_legacy_api*]
+# (Optional) Enable legacy ceilometer api service.
+# Defaults to hiera('enable_legacy_api', false)
+#
# [*ceilometer_network*]
# (Optional) The network name where the ceilometer endpoint is listening on.
# This is set by t-h-t.
@@ -53,6 +57,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::ceilometer::api (
+ $enable_legacy_api = hiera('enable_legacy_ceilometer_api', false),
$ceilometer_network = hiera('ceilometer_api_network', undef),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
@@ -76,7 +81,7 @@ class tripleo::profile::base::ceilometer::api (
$tls_keyfile = undef
}
- if $step >= 4 {
+ if $step >= 4 and $enable_legacy_api {
include ::ceilometer::api
class { '::ceilometer::wsgi::apache':
ssl_cert => $tls_certfile,
diff --git a/manifests/profile/base/ceilometer/collector.pp b/manifests/profile/base/ceilometer/collector.pp
index 3c0a361..20eab54 100644
--- a/manifests/profile/base/ceilometer/collector.pp
+++ b/manifests/profile/base/ceilometer/collector.pp
@@ -68,19 +68,8 @@ class tripleo::profile::base::ceilometer::collector (
if !$mongodb_replset {
fail('mongodb_replset is required when using mongodb')
}
- # NOTE(gfidente): We need to pass the list of IPv6 addresses *with* port
- # and without the brackets as 'members' argument for the 'mongodb_replset'
- # resource.
- if str2bool($mongodb_ipv6) {
- $mongo_node_ips_with_port_prefixed = prefix($mongodb_node_ips, '[')
- $mongo_node_ips_with_port = suffix($mongo_node_ips_with_port_prefixed, ']:27017')
- $mongo_node_ips_with_port_nobr = suffix($mongodb_node_ips, ':27017')
- } else {
- $mongo_node_ips_with_port = suffix($mongodb_node_ips, ':27017')
- $mongo_node_ips_with_port_nobr = suffix($mongodb_node_ips, ':27017')
- }
- $mongo_node_string = join($mongo_node_ips_with_port, ',')
-
+ $mongo_nodes = suffix(any2array(normalize_ip_for_uri($mongodb_node_ips)), ':27017')
+ $mongo_node_string = join($mongo_nodes, ',')
$ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
class { '::ceilometer::db' :