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.

Change-Id: I75441352c29b0421358fc0c87f8708355e7fbb2a
Closes-bug: #1838828
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
tags/9.5.1
David Hill 1 month ago
parent
commit
8b6d68d13f

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

@@ -422,10 +422,6 @@ class { '::neutron::agents::ml2::ovs':
422 422
   bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
423 423
 }
424 424
 
425
-neutron_config {
426
-  'DEFAULT/notification_driver': value => 'messaging';
427
-}
428
-
429 425
 # swift proxy
430 426
 include ::memcached
431 427
 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
@@ -192,7 +194,7 @@ heat::keystone::auth_cfn::admin_url: {{UNDERCLOUD_ENDPOINT_HEAT_CFN_ADMIN}}
192 194
 heat::cron::purge_deleted::age: 1
193 195
 heat::cron::purge_deleted::age_type: 'days'
194 196
 heat::cron::purge_deleted::destination: '/dev/null'
195
-heat::notification_driver: 'messaging'
197
+heat::notification_driver: "%{hiera('notification_driver')}"
196 198
 heat::yaql_memory_quota: 100000
197 199
 heat::yaql_limit_iterators: 1000
198 200
 heat::max_json_body_size: 4194304
@@ -224,7 +226,7 @@ keystone::endpoint::region: "%{hiera('keystone_region')}"
224 226
 keystone::endpoint::version: ''
225 227
 keystone::wsgi::apache::ssl: false
226 228
 keystone::wsgi::apache::bind_host: {{LOCAL_IP}}
227
-keystone::notification_driver: messaging
229
+keystone::notification_driver: "%{hiera('notification_driver')}"
228 230
 keystone::notification_topics: notifications
229 231
 keystone::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP_WRAPPED}}//"
230 232
 keystone::enable_credential_setup: true
@@ -254,6 +256,7 @@ neutron::core_plugin: ml2
254 256
 neutron::service_plugins: ['router', 'segments']
255 257
 neutron::dhcp_agents_per_network: 2
256 258
 neutron::dns_domain: {{OVERCLOUD_DOMAIN_NAME}}
259
+neutron::notification_driver: "%{hiera('notification_driver')}"
257 260
 neutron::server::api_workers: "%{::os_workers}"
258 261
 neutron::server::rpc_workers: "%{::os_workers}"
259 262
 neutron::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP_WRAPPED}}//"
@@ -297,6 +300,7 @@ neutron::agents::ml2::networking_baremetal::region_name: "%{hiera('keystone_regi
297 300
 ceilometer::debug: "%{hiera('debug')}"
298 301
 ceilometer::metering_secret: {{UNDERCLOUD_CEILOMETER_METERING_SECRET}}
299 302
 ceilometer::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP_WRAPPED}}//"
303
+ceilometer::notification_driver: "%{hiera('notification_driver')}"
300 304
 ceilometer::keystone::authtoken::password: {{UNDERCLOUD_CEILOMETER_PASSWORD}}
301 305
 ceilometer::keystone::authtoken::www_authenticate_uri: "%{hiera('keystone_auth_uri')}"
302 306
 ceilometer::keystone::authtoken::auth_url: "%{hiera('keystone_identity_uri')}"
@@ -325,6 +329,7 @@ ceilometer::agent::notification::manage_event_pipeline: true
325 329
 # Aodh
326 330
 aodh::debug: "%{hiera('debug')}"
327 331
 aodh::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP_WRAPPED}}//"
332
+aodh::notification_driver: "%{hiera('notification_driver')}"
328 333
 aodh::api::host: {{LOCAL_IP}}
329 334
 aodh::keystone::authtoken::password: {{UNDERCLOUD_AODH_PASSWORD}}
330 335
 aodh::keystone::authtoken::www_authenticate_uri: "%{hiera('keystone_auth_uri')}"
@@ -400,7 +405,7 @@ panko::keystone::authtoken::project_name: 'service'
400 405
 # Nova
401 406
 nova::debug:  "%{hiera('debug')}"
402 407
 nova::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP_WRAPPED}}//"
403
-nova::notification_driver: messaging
408
+nova::notification_driver: "%{hiera('notification_driver')}"
404 409
 nova::rpc_response_timeout: '600'
405 410
 nova::keystone::authtoken::www_authenticate_uri: "%{hiera('keystone_auth_uri')}"
406 411
 nova::keystone::authtoken::auth_url: "%{hiera('keystone_identity_uri')}"
@@ -487,6 +492,7 @@ nova::db::sync_api::db_sync_timeout: 900
487 492
 ironic::debug: "%{hiera('debug')}"
488 493
 ironic::my_ip: {{LOCAL_IP}}
489 494
 ironic::db_online_data_migrations: true
495
+ironic::notification_driver: "%{hiera('notification_driver')}"
490 496
 # TODO(dtantsur): remove when support for classic drivers is removed
491 497
 ironic::db::online_data_migrations::migration_params: "--option migrate_to_hardware_types.reset_unsupported_interfaces=true"
492 498
 ironic::rpc_response_timeout: 600
@@ -653,6 +659,7 @@ horizon::openstack_endpoint_type: internalURL
653 659
 
654 660
 # Mistral
655 661
 mistral::debug: "%{hiera('debug')}"
662
+mistral::notification_driver: "%{hiera('notification_driver')}"
656 663
 mistral::api::bind_host: {{LOCAL_IP}}
657 664
 mistral::api::api_workers: "%{::os_workers}"
658 665
 mistral::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP_WRAPPED}}//"
@@ -746,6 +753,7 @@ cinder::keystone::authtoken::password: {{UNDERCLOUD_CINDER_PASSWORD}}
746 753
 cinder::keystone::authtoken::user_domain_name: "%{hiera('keystone_default_domain')}"
747 754
 cinder::keystone::authtoken::project_domain_name: "%{hiera('keystone_default_domain')}"
748 755
 cinder::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP_WRAPPED}}//"
756
+cinder::notification_driver: "%{hiera('notification_driver')}"
749 757
 cinder::scheduler::scheduler_driver: cinder.scheduler.filter_scheduler.FilterScheduler
750 758
 cinder::setup_test_volume::size: '10280M'
751 759
 cinder::wsgi::apache::bind_host: {{LOCAL_IP}}

+ 10
- 2
instack_undercloud/undercloud.py View File

@@ -314,7 +314,9 @@ _opts = [
314 314
     cfg.BoolOpt('enable_telemetry',
315 315
                 default=False,
316 316
                 help=('Whether to install Telemetry services '
317
-                      '(ceilometer, gnocchi, aodh, panko ) in the Undercloud.')
317
+                      '(ceilometer, gnocchi, aodh, panko ) in the Undercloud. '
318
+                      'If this is set to False, the notification drivers for '
319
+                      'the OpenStack services will be set to noop.')
318 320
                 ),
319 321
     cfg.BoolOpt('enable_ui',
320 322
                 default=True,
@@ -1171,7 +1173,7 @@ class InstackEnvironment(dict):
1171 1173
                     'LOCAL_IP_WRAPPED', 'ENABLE_ARCHITECTURE_PPC64LE',
1172 1174
                     'INSPECTION_SUBNETS', 'SUBNETS_CIDR_NAT_RULES',
1173 1175
                     'SUBNETS_STATIC_ROUTES', 'MASQUERADE_NETWORKS',
1174
-                    'UNDERCLOUD_PUBLIC_HOST_WRAPPED'}
1176
+                    'UNDERCLOUD_PUBLIC_HOST_WRAPPED', 'NOTIFICATION_DRIVER'}
1175 1177
     """The variables we calculate in _generate_environment call."""
1176 1178
 
1177 1179
     PUPPET_KEYS = DYNAMIC_KEYS | {opt.name.upper() for _, group in list_opts()
@@ -1395,6 +1397,12 @@ def _generate_environment(instack_root):
1395 1397
         inspection_kernel_args.append('ipa-inspection-dhcp-all-interfaces=1')
1396 1398
         inspection_kernel_args.append('ipa-collect-lldp=1')
1397 1399
 
1400
+    # set notification driver based on if we're using telemetry or not
1401
+    if CONF.enable_telemetry:
1402
+        instack_env['NOTIFICATION_DRIVER'] = 'messaging'
1403
+    else:
1404
+        instack_env['NOTIFICATION_DRIVER'] = 'noop'
1405
+
1398 1406
     instack_env['INSPECTION_KERNEL_ARGS'] = ' '.join(inspection_kernel_args)
1399 1407
 
1400 1408
     _process_drivers_and_hardware_types(instack_env)

Loading…
Cancel
Save