From d5145167cb13170cb2f8b928b3c920648e7ecaf0 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 7 Jul 2017 11:35:28 -0700 Subject: [PATCH] Allow to set Notification Driver to 'noop' This patch does 2 things: * Configure messagingv2 as default driver for Oslo Notifications sent on RPC. * Allow users to choose between messagingv2 (default) and noop when we want to disable notifications (for example, when Telemetry is disabled). * Deprecate KeystoneNotificationDriver in favor of NotificationDriver. Change-Id: Ia547d7f4bfb51e7c45246b097b48fd86da231bd3 Related-Bug: #1701357 --- environments/disable-telemetry.yaml | 3 +++ environments/neutron-ml2-bigswitch.yaml | 1 - puppet/services/aodh-base.yaml | 7 +++++++ puppet/services/barbican-api.yaml | 7 +++++++ puppet/services/ceilometer-base.yaml | 7 +++++++ puppet/services/cinder-api.yaml | 7 +++++++ puppet/services/congress.yaml | 7 +++++++ puppet/services/glance-api.yaml | 8 +++++++- puppet/services/heat-base.yaml | 7 +++++++ puppet/services/keystone.yaml | 9 ++++++++- puppet/services/manila-base.yaml | 7 +++++++ puppet/services/mistral-base.yaml | 7 +++++++ puppet/services/neutron-base.yaml | 7 +++++++ puppet/services/nova-base.yaml | 8 +++++++- puppet/services/octavia-base.yaml | 7 +++++++ puppet/services/sahara-base.yaml | 7 +++++++ puppet/services/tacker.yaml | 7 +++++++ .../notification-driver-noop-e322ca6704a5bc50.yaml | 10 ++++++++++ 18 files changed, 119 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/notification-driver-noop-e322ca6704a5bc50.yaml diff --git a/environments/disable-telemetry.yaml b/environments/disable-telemetry.yaml index 6249c28695..52d0d27b08 100644 --- a/environments/disable-telemetry.yaml +++ b/environments/disable-telemetry.yaml @@ -18,3 +18,6 @@ resource_registry: OS::TripleO::Services::AodhNotifier: OS::Heat::None OS::TripleO::Services::AodhListener: OS::Heat::None OS::TripleO::Services::PankoApi: OS::Heat::None + +parameter_defaults: + NotificationDriver: 'noop' diff --git a/environments/neutron-ml2-bigswitch.yaml b/environments/neutron-ml2-bigswitch.yaml index 8a4a144c5c..c0ba906ec2 100644 --- a/environments/neutron-ml2-bigswitch.yaml +++ b/environments/neutron-ml2-bigswitch.yaml @@ -13,7 +13,6 @@ parameter_defaults: NeutronBigswitchRestproxyServerAuth: NeutronMechanismDrivers: openvswitch,bsn_ml2 NeutronServicePlugins: bsn_l3,bsn_service_plugin - KeystoneNotificationDriver: messaging # Optional: # NeutronBigswitchRestproxyAutoSyncOnFailure: diff --git a/puppet/services/aodh-base.yaml b/puppet/services/aodh-base.yaml index 0563d08b7e..c6a8f8809b 100644 --- a/puppet/services/aodh-base.yaml +++ b/puppet/services/aodh-base.yaml @@ -64,6 +64,12 @@ parameters: type: string default: 'regionOne' description: Keystone region for endpoint + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: service_debug_unset: {equals : [{get_param: AodhDebug}, '']} @@ -91,6 +97,7 @@ outputs: - {get_param: Debug } - {get_param: AodhDebug } aodh::auth::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] } + aodh::notification_driver: {get_param: NotificationDriver} aodh::rabbit_userid: {get_param: RabbitUserName} aodh::rabbit_password: {get_param: RabbitPassword} aodh::rabbit_use_ssl: {get_param: RabbitClientUseSSL} diff --git a/puppet/services/barbican-api.yaml b/puppet/services/barbican-api.yaml index 5133124276..65c26d40ab 100644 --- a/puppet/services/barbican-api.yaml +++ b/puppet/services/barbican-api.yaml @@ -73,6 +73,12 @@ parameters: e.g. { barbican-context_is_admin: { key: context_is_admin, value: 'role:admin' } } default: {} type: json + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] resources: @@ -109,6 +115,7 @@ outputs: - service_debug_unset - {get_param: Debug } - {get_param: BarbicanDebug } + barbican::api::notification_driver: {get_param: NotificationDriver} barbican::api::rabbit_use_ssl: {get_param: RabbitClientUseSSL} barbican::api::rabbit_userid: {get_param: RabbitUserName} barbican::api::rabbit_password: {get_param: RabbitPassword} diff --git a/puppet/services/ceilometer-base.yaml b/puppet/services/ceilometer-base.yaml index 1d86369bf8..0cd9a6dd87 100644 --- a/puppet/services/ceilometer-base.yaml +++ b/puppet/services/ceilometer-base.yaml @@ -103,6 +103,12 @@ parameters: description: The user password for SNMPd with readonly rights running on all Overcloud nodes type: string hidden: true + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: service_debug_unset: {equals : [{get_param: CeilometerDebug}, '']} @@ -139,6 +145,7 @@ outputs: ceilometer::dispatcher::gnocchi::filter_project: 'service' ceilometer::dispatcher::gnocchi::archive_policy: 'low' ceilometer::dispatcher::gnocchi::resources_definition_file: 'gnocchi_resources.yaml' + ceilometer::notification_driver: {get_param: NotificationDriver} ceilometer::rabbit_userid: {get_param: RabbitUserName} ceilometer::rabbit_password: {get_param: RabbitPassword} ceilometer::rabbit_use_ssl: {get_param: RabbitClientUseSSL} diff --git a/puppet/services/cinder-api.yaml b/puppet/services/cinder-api.yaml index 036209f37b..47715a7ee3 100644 --- a/puppet/services/cinder-api.yaml +++ b/puppet/services/cinder-api.yaml @@ -60,6 +60,12 @@ parameters: e.g. { cinder-context_is_admin: { key: context_is_admin, value: 'role:admin' } } default: {} type: json + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: cinder_workers_zero: {equals : [{get_param: CinderWorkers}, 0]} @@ -105,6 +111,7 @@ outputs: cinder::keystone::authtoken::user_domain_name: 'Default' cinder::keystone::authtoken::project_domain_name: 'Default' cinder::policy::policies: {get_param: CinderApiPolicies} + cinder::ceilometer::notification_driver: {get_param: NotificationDriver} cinder::api::enable_proxy_headers_parsing: true cinder::api::nova_catalog_info: 'compute:nova:internalURL' diff --git a/puppet/services/congress.yaml b/puppet/services/congress.yaml index 5bca94d778..f30f1139ae 100644 --- a/puppet/services/congress.yaml +++ b/puppet/services/congress.yaml @@ -65,6 +65,12 @@ parameters: e.g. { congress-context_is_admin: { key: context_is_admin, value: 'role:admin' } } default: {} type: json + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: service_debug_unset: {equals : [{get_param: CongressDebug}, '']} @@ -92,6 +98,7 @@ outputs: - {get_param: Debug } - {get_param: CongressDebug } congress::rpc_backend: rabbit + congress::notification_driver: {get_param: NotificationDriver} congress::rabbit_userid: {get_param: RabbitUserName} congress::rabbit_password: {get_param: RabbitPassword} congress::rabbit_use_ssl: {get_param: RabbitClientUseSSL} diff --git a/puppet/services/glance-api.yaml b/puppet/services/glance-api.yaml index a3d5a7935b..53cde963c9 100644 --- a/puppet/services/glance-api.yaml +++ b/puppet/services/glance-api.yaml @@ -128,6 +128,12 @@ parameters: e.g. { glance-context_is_admin: { key: context_is_admin, value: 'role:admin' } } default: {} type: json + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: use_tls_proxy: {equals : [{get_param: EnableInternalTLS}, true]} @@ -237,7 +243,7 @@ outputs: glance::notify::rabbitmq::rabbit_port: {get_param: RabbitClientPort} glance::notify::rabbitmq::rabbit_password: {get_param: RabbitPassword} glance::notify::rabbitmq::rabbit_use_ssl: {get_param: RabbitClientUseSSL} - glance::notify::rabbitmq::notification_driver: messagingv2 + glance::notify::rabbitmq::notification_driver: {get_param: NotificationDriver} tripleo::profile::base::glance::api::glance_nfs_enabled: {get_param: GlanceNfsEnabled} tripleo::glance::nfs_mount::share: {get_param: GlanceNfsShare} tripleo::glance::nfs_mount::options: {get_param: GlanceNfsOptions} diff --git a/puppet/services/heat-base.yaml b/puppet/services/heat-base.yaml index d89fe46af8..d305edb567 100644 --- a/puppet/services/heat-base.yaml +++ b/puppet/services/heat-base.yaml @@ -115,6 +115,12 @@ parameters: default: 1048576 description: Maximum raw byte size of the Heat API JSON request body. type: number + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: service_debug_unset: {equals : [{get_param: HeatDebug}, '']} @@ -125,6 +131,7 @@ outputs: value: service_name: heat_base config_settings: + heat::notification_driver: {get_param: NotificationDriver} heat::rabbit_userid: {get_param: RabbitUserName} heat::rabbit_password: {get_param: RabbitPassword} heat::rabbit_use_ssl: {get_param: RabbitClientUseSSL} diff --git a/puppet/services/keystone.yaml b/puppet/services/keystone.yaml index 60d194bcf2..9535682a03 100644 --- a/puppet/services/keystone.yaml +++ b/puppet/services/keystone.yaml @@ -203,6 +203,12 @@ parameters: type: json default: {} hidden: true + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] parameter_groups: - label: deprecated @@ -214,6 +220,7 @@ parameter_groups: parameters: - KeystoneFernetKey0 - KeystoneFernetKey1 + - KeystoneNotificationDriver resources: @@ -281,7 +288,7 @@ outputs: keystone::rabbit_password: {get_param: RabbitPassword} keystone::rabbit_use_ssl: {get_param: RabbitClientUseSSL} keystone::rabbit_port: {get_param: RabbitClientPort} - keystone::notification_driver: {get_param: KeystoneNotificationDriver} + keystone::notification_driver: {get_param: NotificationDriver} keystone::notification_format: {get_param: KeystoneNotificationFormat} keystone::roles::admin::email: {get_param: AdminEmail} keystone::roles::admin::password: {get_param: AdminPassword} diff --git a/puppet/services/manila-base.yaml b/puppet/services/manila-base.yaml index d0ee2125ad..54f416bb52 100644 --- a/puppet/services/manila-base.yaml +++ b/puppet/services/manila-base.yaml @@ -56,6 +56,12 @@ parameters: description: The password for the manila service account. type: string hidden: true + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: service_debug_unset: {equals : [{get_param: ManilaDebug}, '']} @@ -66,6 +72,7 @@ outputs: value: service_name: manila_base config_settings: + manila::notification_driver: {get_param: NotificationDriver} manila::rabbit_userid: {get_param: RabbitUserName} manila::rabbit_password: {get_param: RabbitPassword} manila::rabbit_use_ssl: {get_param: RabbitClientUseSSL} diff --git a/puppet/services/mistral-base.yaml b/puppet/services/mistral-base.yaml index 8b3655ddbf..a0d203ce17 100644 --- a/puppet/services/mistral-base.yaml +++ b/puppet/services/mistral-base.yaml @@ -61,6 +61,12 @@ parameters: type: string default: 'regionOne' description: Keystone region for endpoint + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: service_debug_unset: {equals : [{get_param: MistralDebug}, '']} @@ -81,6 +87,7 @@ outputs: query: read_default_file: /etc/my.cnf.d/tripleo.cnf read_default_group: tripleo + mistral::notification_driver: {get_param: NotificationDriver} mistral::rabbit_userid: {get_param: RabbitUserName} mistral::rabbit_password: {get_param: RabbitPassword} mistral::rabbit_use_ssl: {get_param: RabbitClientUseSSL} diff --git a/puppet/services/neutron-base.yaml b/puppet/services/neutron-base.yaml index 3c7518b3d1..da7ad19913 100644 --- a/puppet/services/neutron-base.yaml +++ b/puppet/services/neutron-base.yaml @@ -91,6 +91,12 @@ parameters: description: Mapping of service endpoint -> protocol. Typically set via parameter_defaults in the resource registry. type: json + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: dhcp_agents_zero: {equals : [{get_param: NeutronDhcpAgentsPerNetwork}, 0]} @@ -107,6 +113,7 @@ outputs: neutron::rabbit_user: {get_param: RabbitUserName} neutron::rabbit_use_ssl: {get_param: RabbitClientUseSSL} neutron::rabbit_port: {get_param: RabbitClientPort} + neutron::notification_driver: {get_param: NotificationDriver} neutron::core_plugin: {get_param: NeutronCorePlugin} neutron::service_plugins: {get_param: NeutronServicePlugins} neutron::debug: diff --git a/puppet/services/nova-base.yaml b/puppet/services/nova-base.yaml index ea58493216..809d3ff54a 100644 --- a/puppet/services/nova-base.yaml +++ b/puppet/services/nova-base.yaml @@ -30,6 +30,12 @@ parameters: type: string default: 'regionOne' description: Keystone region for endpoint + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] NovaPassword: description: The password for the nova service and db account, used by nova-api. type: string @@ -215,7 +221,7 @@ outputs: nova::cinder_catalog_info: 'volumev2:cinderv2:internalURL' nova::host: '%{::fqdn}' nova::notify_on_state_change: 'vm_and_task_state' - nova::notification_driver: messagingv2 + nova::notification_driver: {get_param: NotificationDriver} nova::network::neutron::neutron_auth_type: 'v3password' nova::db::database_db_max_retries: -1 nova::db::database_max_retries: -1 diff --git a/puppet/services/octavia-base.yaml b/puppet/services/octavia-base.yaml index 0809b3e4c8..1246813dc1 100644 --- a/puppet/services/octavia-base.yaml +++ b/puppet/services/octavia-base.yaml @@ -58,6 +58,12 @@ parameters: default: 5672 description: Set rabbit subscriber port, change this if using SSL type: number + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: service_debug_unset: {equals : [{get_param: OctaviaDebug}, '']} @@ -74,6 +80,7 @@ outputs: - {get_param: Debug } - {get_param: OctaviaDebug } octavia::purge_config: {get_param: EnableConfigPurge} + octavia::notification_driver: {get_param: NotificationDriver} octavia::rabbit_use_ssl: {get_param: RabbitClientUseSSL} octavia::rabbit_userid: {get_param: RabbitUserName} octavia::rabbit_password: {get_param: RabbitPassword} diff --git a/puppet/services/sahara-base.yaml b/puppet/services/sahara-base.yaml index c294e744d3..d51106172a 100644 --- a/puppet/services/sahara-base.yaml +++ b/puppet/services/sahara-base.yaml @@ -60,6 +60,12 @@ parameters: default: ["ambari","cdh","mapr","vanilla","spark","storm"] description: Sahara enabled plugin list type: comma_delimited_list + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: service_debug_unset: {equals : [{get_param: SaharaDebug}, '']} @@ -80,6 +86,7 @@ outputs: query: read_default_file: /etc/my.cnf.d/tripleo.cnf read_default_group: tripleo + sahara::notify::notification_driver: {get_param: NotificationDriver} sahara::rabbit_password: {get_param: RabbitPassword} sahara::rabbit_user: {get_param: RabbitUserName} sahara::rabbit_use_ssl: {get_param: RabbitClientUseSSL} diff --git a/puppet/services/tacker.yaml b/puppet/services/tacker.yaml index 5ced8c3c1f..44c638bf08 100644 --- a/puppet/services/tacker.yaml +++ b/puppet/services/tacker.yaml @@ -65,6 +65,12 @@ parameters: e.g. { tacker-context_is_admin: { key: context_is_admin, value: 'role:admin' } } default: {} type: json + NotificationDriver: + type: string + default: 'messagingv2' + description: Driver or drivers to handle sending notifications. + constraints: + - allowed_values: [ 'messagingv2', 'noop' ] conditions: service_debug_unset: {equals : [{get_param: TackerDebug}, '']} @@ -93,6 +99,7 @@ outputs: - {get_param: Debug } - {get_param: TackerDebug } tacker::rpc_backend: rabbit + tacker::notification_driver: {get_param: NotificationDriver} tacker::rabbit_userid: {get_param: RabbitUserName} tacker::rabbit_password: {get_param: RabbitPassword} tacker::rabbit_use_ssl: {get_param: RabbitClientUseSSL} diff --git a/releasenotes/notes/notification-driver-noop-e322ca6704a5bc50.yaml b/releasenotes/notes/notification-driver-noop-e322ca6704a5bc50.yaml new file mode 100644 index 0000000000..b7090973a6 --- /dev/null +++ b/releasenotes/notes/notification-driver-noop-e322ca6704a5bc50.yaml @@ -0,0 +1,10 @@ +--- +features: + - | + Allow to configure the Message Queue notification driver. + By default, we'll configure 'messagingv2' but we can now + override NotificationDriver parameter and set 'noop' when + we don't want notifications, which is the case when + we disable Telemetry services. +deprecations: + - KeystoneNotificationDriver is deprecated in favor of NotificationDriver.