Browse Source

Set notification driver to noop when enable_telemetry=false

Actually, enable_telemetry=false doesn't do anything because
the notification_drivers values are hardcoded to messaging.
This commit changes this behavior by setting notification_drivers
to noop if enable_telemetry is set to false.

Conflicts:
	elements/puppet-stack-config/puppet-stack-config.yaml.template

Change-Id: I75441352c29b0421358fc0c87f8708355e7fbb2a
Closes-bug: #1838828
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
(cherry picked from commit 8b6d68d13f)
tags/8.4.9
David Hill 1 month ago
parent
commit
3e1125cc72

+ 0
- 4
elements/puppet-stack-config/puppet-stack-config.pp View File

@@ -440,10 +440,6 @@ class { '::neutron::agents::ml2::ovs':
440 440
   bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
441 441
 }
442 442
 
443
-neutron_config {
444
-  'DEFAULT/notification_driver': value => 'messaging';
445
-}
446
-
447 443
 # swift proxy
448 444
 include ::memcached
449 445
 include ::swift::proxy

+ 11
- 3
elements/puppet-stack-config/puppet-stack-config.yaml.template View File

@@ -3,6 +3,8 @@ keystone_auth_uri: {{UNDERCLOUD_ENDPOINT_KEYSTONE_PUBLIC}}/v3
3 3
 keystone_region: 'regionOne'
4 4
 keystone_default_domain: 'Default'
5 5
 
6
+notification_driver: {{NOTIFICATION_DRIVER}}
7
+
6 8
 debug: {{UNDERCLOUD_DEBUG}}
7 9
 controller_host: {{LOCAL_IP}} #local-ipv4
8 10
 #local-ipv4 similar to the same hiera key in the overcloud
@@ -196,7 +198,7 @@ heat::keystone::auth_cfn::admin_url: {{UNDERCLOUD_ENDPOINT_HEAT_CFN_ADMIN}}
196 198
 heat::cron::purge_deleted::age: 1
197 199
 heat::cron::purge_deleted::age_type: 'days'
198 200
 heat::cron::purge_deleted::destination: '/dev/null'
199
-heat::notification_driver: 'messaging'
201
+heat::notification_driver: "%{hiera('notification_driver')}"
200 202
 heat::yaql_memory_quota: 100000
201 203
 heat::yaql_limit_iterators: 1000
202 204
 heat::max_json_body_size: 4194304
@@ -228,7 +230,7 @@ keystone::endpoint::region: "%{hiera('keystone_region')}"
228 230
 keystone::endpoint::version: ''
229 231
 keystone::wsgi::apache::ssl: false
230 232
 keystone::wsgi::apache::bind_host: {{LOCAL_IP}}
231
-keystone::notification_driver: messaging
233
+keystone::notification_driver: "%{hiera('notification_driver')}"
232 234
 keystone::notification_topics: notifications
233 235
 keystone::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
234 236
 keystone::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
@@ -261,6 +263,7 @@ neutron::core_plugin: ml2
261 263
 neutron::service_plugins: ['router']
262 264
 neutron::dhcp_agents_per_network: 2
263 265
 neutron::dns_domain: {{OVERCLOUD_DOMAIN_NAME}}
266
+neutron::notification_driver: "%{hiera('notification_driver')}"
264 267
 neutron::server::api_workers: "%{::os_workers}"
265 268
 neutron::server::rpc_workers: "%{::os_workers}"
266 269
 neutron::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
@@ -308,6 +311,7 @@ ceilometer::metering_secret: {{UNDERCLOUD_CEILOMETER_METERING_SECRET}}
308 311
 ceilometer::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
309 312
 ceilometer::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
310 313
 ceilometer::rabbit_host: "{{LOCAL_IP_WRAPPED}}"
314
+ceilometer::notification_driver: "%{hiera('notification_driver')}"
311 315
 ceilometer::keystone::authtoken::password: {{UNDERCLOUD_CEILOMETER_PASSWORD}}
312 316
 ceilometer::keystone::authtoken::auth_uri: "%{hiera('keystone_auth_uri')}"
313 317
 ceilometer::keystone::authtoken::auth_url: "%{hiera('keystone_identity_uri')}"
@@ -338,6 +342,7 @@ aodh::debug: "%{hiera('debug')}"
338 342
 aodh::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
339 343
 aodh::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
340 344
 aodh::rabbit_host: "{{LOCAL_IP_WRAPPED}}"
345
+aodh::notification_driver: "%{hiera('notification_driver')}"
341 346
 aodh::api::host: {{LOCAL_IP}}
342 347
 aodh::keystone::authtoken::password: {{UNDERCLOUD_AODH_PASSWORD}}
343 348
 aodh::keystone::authtoken::auth_uri: "%{hiera('keystone_auth_uri')}"
@@ -413,7 +418,7 @@ panko::keystone::authtoken::project_name: 'service'
413 418
 # Nova
414 419
 nova::debug:  "%{hiera('debug')}"
415 420
 nova::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP_WRAPPED}}//"
416
-nova::notification_driver: messaging
421
+nova::notification_driver: "%{hiera('notification_driver')}"
417 422
 nova::rpc_response_timeout: '600'
418 423
 nova::keystone::authtoken::auth_uri: "%{hiera('keystone_auth_uri')}"
419 424
 nova::keystone::authtoken::auth_url: "%{hiera('keystone_identity_uri')}"
@@ -501,6 +506,7 @@ nova::db::sync_api::db_sync_timeout: 900
501 506
 ironic::debug: "%{hiera('debug')}"
502 507
 ironic::my_ip: {{LOCAL_IP}}
503 508
 ironic::db_online_data_migrations: true
509
+ironic::notification_driver: "%{hiera('notification_driver')}"
504 510
 # TODO(dtantsur): remove when support for classic drivers is removed
505 511
 ironic::db::online_data_migrations::migration_params: "--option migrate_to_hardware_types.reset_unsupported_interfaces=true"
506 512
 ironic::rpc_response_timeout: 600
@@ -669,6 +675,7 @@ horizon::openstack_endpoint_type: internalURL
669 675
 
670 676
 # Mistral
671 677
 mistral::debug: "%{hiera('debug')}"
678
+mistral::notification_driver: "%{hiera('notification_driver')}"
672 679
 mistral::api::bind_host: {{LOCAL_IP}}
673 680
 mistral::api::api_workers: "%{::os_workers}"
674 681
 mistral::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
@@ -766,6 +773,7 @@ cinder::keystone::authtoken::project_domain_name: "%{hiera('keystone_default_dom
766 773
 cinder::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
767 774
 cinder::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
768 775
 cinder::rabbit_host: "{{LOCAL_IP_WRAPPED}}"
776
+cinder::notification_driver: "%{hiera('notification_driver')}"
769 777
 cinder::scheduler::scheduler_driver: cinder.scheduler.filter_scheduler.FilterScheduler
770 778
 cinder::setup_test_volume::size: '10280M'
771 779
 cinder::wsgi::apache::bind_host: {{LOCAL_IP}}

+ 10
- 2
instack_undercloud/undercloud.py View File

@@ -325,7 +325,9 @@ _opts = [
325 325
     cfg.BoolOpt('enable_telemetry',
326 326
                 default=False,
327 327
                 help=('Whether to install Telemetry services '
328
-                      '(ceilometer, gnocchi, aodh, panko ) in the Undercloud.')
328
+                      '(ceilometer, gnocchi, aodh, panko ) in the Undercloud. '
329
+                      'If this is set to False, the notification drivers for '
330
+                      'the OpenStack services will be set to noop.')
329 331
                 ),
330 332
     cfg.BoolOpt('enable_ui',
331 333
                 default=True,
@@ -1182,7 +1184,7 @@ class InstackEnvironment(dict):
1182 1184
                     'LOCAL_IP_WRAPPED', 'ENABLE_ARCHITECTURE_PPC64LE',
1183 1185
                     'INSPECTION_SUBNETS', 'SUBNETS_CIDR_NAT_RULES',
1184 1186
                     'SUBNETS_STATIC_ROUTES', 'MASQUERADE_NETWORKS',
1185
-                    'UNDERCLOUD_PUBLIC_HOST_WRAPPED'}
1187
+                    'UNDERCLOUD_PUBLIC_HOST_WRAPPED', 'NOTIFICATION_DRIVER'}
1186 1188
     """The variables we calculate in _generate_environment call."""
1187 1189
 
1188 1190
     PUPPET_KEYS = DYNAMIC_KEYS | {opt.name.upper() for _, group in list_opts()
@@ -1424,6 +1426,12 @@ def _generate_environment(instack_root):
1424 1426
         inspection_kernel_args.append('ipa-inspection-dhcp-all-interfaces=1')
1425 1427
         inspection_kernel_args.append('ipa-collect-lldp=1')
1426 1428
 
1429
+    # set notification driver based on if we're using telemetry or not
1430
+    if CONF.enable_telemetry:
1431
+        instack_env['NOTIFICATION_DRIVER'] = 'messaging'
1432
+    else:
1433
+        instack_env['NOTIFICATION_DRIVER'] = 'noop'
1434
+
1427 1435
     instack_env['INSPECTION_KERNEL_ARGS'] = ' '.join(inspection_kernel_args)
1428 1436
 
1429 1437
     _process_drivers_and_hardware_types(instack_env)

Loading…
Cancel
Save