summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>2017-11-01 10:47:49 +0000
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>2017-11-13 14:20:44 +0000
commitb25798b8f000facad56a83b0158809072b527813 (patch)
tree484dc90438c8443408a4c0975a2cb4d99f9cb9f9
parentf2b1ec7ee9c70563ed682c314910c8fd4c6871aa (diff)
Make keystone notification topics configurable
By default keystone sends notifications to the 'notifications' topic. This is consumed by default by ceilometer. However, when ceilometer is not enabled, rabbitmq accumulates these notifications since nothing is consuming them. This results in the queue consuming rabbitmq's memory. With this capability, we can now dynamically configure notification topics depending on the 'keystone_notification_topics' hiera key. Related-Bug: #1729293 Change-Id: I4dcce73446633c08ea37ba567610eec398094036 (cherry picked from commit bbe7d9effe51324ef5fa75e40f9d0ca74544d484)
-rw-r--r--manifests/profile/base/keystone.pp59
-rw-r--r--releasenotes/notes/keystone-notification-topics-5b155e7b5e60b7fd.yaml7
2 files changed, 42 insertions, 24 deletions
diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp
index 6ce655e..6dd271e 100644
--- a/manifests/profile/base/keystone.pp
+++ b/manifests/profile/base/keystone.pp
@@ -121,36 +121,46 @@
# Enable ssl oslo messaging services
# Defaults to hiera('keystone::rabbit_use_ssl', '0')
#
+# [*ceilometer_notification_topics*]
+# Notification topics that keystone should use for ceilometer to consume.
+# Defaults to []
+#
+# [*extra_notification_topics*]
+# Extra notification topics that keystone should produce.
+# Defaults to []
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::keystone (
- $admin_endpoint_network = hiera('keystone_admin_api_network', undef),
- $bootstrap_node = hiera('bootstrap_nodeid', undef),
- $certificates_specs = hiera('apache_certificates_specs', {}),
- $enable_internal_tls = hiera('enable_internal_tls', false),
- $heat_admin_domain = undef,
- $heat_admin_email = undef,
- $heat_admin_password = undef,
- $heat_admin_user = undef,
- $ldap_backends_config = undef,
- $ldap_backend_enable = false,
- $manage_db_purge = hiera('keystone_enable_db_purge', true),
- $public_endpoint_network = hiera('keystone_public_api_network', undef),
- $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
- $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_node_names', undef)),
- $oslomsg_rpc_password = hiera('keystone::rabbit_password'),
- $oslomsg_rpc_port = hiera('keystone::rabbit_port', '5672'),
- $oslomsg_rpc_username = hiera('keystone::rabbit_userid', 'guest'),
- $oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
- $oslomsg_notify_hosts = any2array(hiera('rabbitmq_node_names', undef)),
- $oslomsg_notify_password = hiera('keystone::rabbit_password'),
- $oslomsg_notify_port = hiera('keystone::rabbit_port', '5672'),
- $oslomsg_notify_username = hiera('keystone::rabbit_userid', 'guest'),
- $oslomsg_use_ssl = hiera('keystone::rabbit_use_ssl', '0'),
- $step = Integer(hiera('step')),
+ $admin_endpoint_network = hiera('keystone_admin_api_network', undef),
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $certificates_specs = hiera('apache_certificates_specs', {}),
+ $enable_internal_tls = hiera('enable_internal_tls', false),
+ $heat_admin_domain = undef,
+ $heat_admin_email = undef,
+ $heat_admin_password = undef,
+ $heat_admin_user = undef,
+ $ldap_backends_config = undef,
+ $ldap_backend_enable = false,
+ $manage_db_purge = hiera('keystone_enable_db_purge', true),
+ $public_endpoint_network = hiera('keystone_public_api_network', undef),
+ $oslomsg_rpc_proto = hiera('messaging_rpc_service_name', 'rabbit'),
+ $oslomsg_rpc_hosts = any2array(hiera('rabbitmq_node_names', undef)),
+ $oslomsg_rpc_password = hiera('keystone::rabbit_password'),
+ $oslomsg_rpc_port = hiera('keystone::rabbit_port', '5672'),
+ $oslomsg_rpc_username = hiera('keystone::rabbit_userid', 'guest'),
+ $oslomsg_notify_proto = hiera('messaging_notify_service_name', 'rabbit'),
+ $oslomsg_notify_hosts = any2array(hiera('rabbitmq_node_names', undef)),
+ $oslomsg_notify_password = hiera('keystone::rabbit_password'),
+ $oslomsg_notify_port = hiera('keystone::rabbit_port', '5672'),
+ $oslomsg_notify_username = hiera('keystone::rabbit_userid', 'guest'),
+ $oslomsg_use_ssl = hiera('keystone::rabbit_use_ssl', '0'),
+ $ceilometer_notification_topics = [],
+ $extra_notification_topics = [],
+ $step = Integer(hiera('step')),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -204,6 +214,7 @@ class tripleo::profile::base::keystone (
'password' => $oslomsg_notify_password,
'ssl' => $oslomsg_use_ssl_real,
}),
+ notification_topics => union($ceilometer_notification_topics, $extra_notification_topics)
}
if 'amqp' in [$oslomsg_rpc_proto, $oslomsg_notify_proto]{
diff --git a/releasenotes/notes/keystone-notification-topics-5b155e7b5e60b7fd.yaml b/releasenotes/notes/keystone-notification-topics-5b155e7b5e60b7fd.yaml
new file mode 100644
index 0000000..3986c6f
--- /dev/null
+++ b/releasenotes/notes/keystone-notification-topics-5b155e7b5e60b7fd.yaml
@@ -0,0 +1,7 @@
+---
+features:
+ - |
+ keystone notification topics are now configured via the
+ keystone_notification_topics hiera key. Which aggregates
+ all the keys that match this. It's useful for dynamically
+ configuring the topics and not always sending them.