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)
This commit is contained in:
David Hill 2019-08-01 22:52:59 -04:00 committed by Alex Schultz
parent 3d17c6d685
commit 3e1125cc72
3 changed files with 21 additions and 9 deletions

View File

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

View File

@ -3,6 +3,8 @@ keystone_auth_uri: {{UNDERCLOUD_ENDPOINT_KEYSTONE_PUBLIC}}/v3
keystone_region: 'regionOne' keystone_region: 'regionOne'
keystone_default_domain: 'Default' keystone_default_domain: 'Default'
notification_driver: {{NOTIFICATION_DRIVER}}
debug: {{UNDERCLOUD_DEBUG}} debug: {{UNDERCLOUD_DEBUG}}
controller_host: {{LOCAL_IP}} #local-ipv4 controller_host: {{LOCAL_IP}} #local-ipv4
#local-ipv4 similar to the same hiera key in the overcloud #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}}
heat::cron::purge_deleted::age: 1 heat::cron::purge_deleted::age: 1
heat::cron::purge_deleted::age_type: 'days' heat::cron::purge_deleted::age_type: 'days'
heat::cron::purge_deleted::destination: '/dev/null' heat::cron::purge_deleted::destination: '/dev/null'
heat::notification_driver: 'messaging' heat::notification_driver: "%{hiera('notification_driver')}"
heat::yaql_memory_quota: 100000 heat::yaql_memory_quota: 100000
heat::yaql_limit_iterators: 1000 heat::yaql_limit_iterators: 1000
heat::max_json_body_size: 4194304 heat::max_json_body_size: 4194304
@ -228,7 +230,7 @@ keystone::endpoint::region: "%{hiera('keystone_region')}"
keystone::endpoint::version: '' keystone::endpoint::version: ''
keystone::wsgi::apache::ssl: false keystone::wsgi::apache::ssl: false
keystone::wsgi::apache::bind_host: {{LOCAL_IP}} keystone::wsgi::apache::bind_host: {{LOCAL_IP}}
keystone::notification_driver: messaging keystone::notification_driver: "%{hiera('notification_driver')}"
keystone::notification_topics: notifications keystone::notification_topics: notifications
keystone::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}} keystone::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
keystone::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}} keystone::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
@ -261,6 +263,7 @@ neutron::core_plugin: ml2
neutron::service_plugins: ['router'] neutron::service_plugins: ['router']
neutron::dhcp_agents_per_network: 2 neutron::dhcp_agents_per_network: 2
neutron::dns_domain: {{OVERCLOUD_DOMAIN_NAME}} neutron::dns_domain: {{OVERCLOUD_DOMAIN_NAME}}
neutron::notification_driver: "%{hiera('notification_driver')}"
neutron::server::api_workers: "%{::os_workers}" neutron::server::api_workers: "%{::os_workers}"
neutron::server::rpc_workers: "%{::os_workers}" neutron::server::rpc_workers: "%{::os_workers}"
neutron::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}} neutron::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
@ -308,6 +311,7 @@ ceilometer::metering_secret: {{UNDERCLOUD_CEILOMETER_METERING_SECRET}}
ceilometer::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}} ceilometer::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
ceilometer::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}} ceilometer::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
ceilometer::rabbit_host: "{{LOCAL_IP_WRAPPED}}" ceilometer::rabbit_host: "{{LOCAL_IP_WRAPPED}}"
ceilometer::notification_driver: "%{hiera('notification_driver')}"
ceilometer::keystone::authtoken::password: {{UNDERCLOUD_CEILOMETER_PASSWORD}} ceilometer::keystone::authtoken::password: {{UNDERCLOUD_CEILOMETER_PASSWORD}}
ceilometer::keystone::authtoken::auth_uri: "%{hiera('keystone_auth_uri')}" ceilometer::keystone::authtoken::auth_uri: "%{hiera('keystone_auth_uri')}"
ceilometer::keystone::authtoken::auth_url: "%{hiera('keystone_identity_uri')}" ceilometer::keystone::authtoken::auth_url: "%{hiera('keystone_identity_uri')}"
@ -338,6 +342,7 @@ aodh::debug: "%{hiera('debug')}"
aodh::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}} aodh::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
aodh::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}} aodh::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
aodh::rabbit_host: "{{LOCAL_IP_WRAPPED}}" aodh::rabbit_host: "{{LOCAL_IP_WRAPPED}}"
aodh::notification_driver: "%{hiera('notification_driver')}"
aodh::api::host: {{LOCAL_IP}} aodh::api::host: {{LOCAL_IP}}
aodh::keystone::authtoken::password: {{UNDERCLOUD_AODH_PASSWORD}} aodh::keystone::authtoken::password: {{UNDERCLOUD_AODH_PASSWORD}}
aodh::keystone::authtoken::auth_uri: "%{hiera('keystone_auth_uri')}" aodh::keystone::authtoken::auth_uri: "%{hiera('keystone_auth_uri')}"
@ -413,7 +418,7 @@ panko::keystone::authtoken::project_name: 'service'
# Nova # Nova
nova::debug: "%{hiera('debug')}" nova::debug: "%{hiera('debug')}"
nova::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP_WRAPPED}}//" nova::default_transport_url: "rabbit://{{UNDERCLOUD_RABBIT_USERNAME}}:{{UNDERCLOUD_RABBIT_PASSWORD}}@{{LOCAL_IP_WRAPPED}}//"
nova::notification_driver: messaging nova::notification_driver: "%{hiera('notification_driver')}"
nova::rpc_response_timeout: '600' nova::rpc_response_timeout: '600'
nova::keystone::authtoken::auth_uri: "%{hiera('keystone_auth_uri')}" nova::keystone::authtoken::auth_uri: "%{hiera('keystone_auth_uri')}"
nova::keystone::authtoken::auth_url: "%{hiera('keystone_identity_uri')}" nova::keystone::authtoken::auth_url: "%{hiera('keystone_identity_uri')}"
@ -501,6 +506,7 @@ nova::db::sync_api::db_sync_timeout: 900
ironic::debug: "%{hiera('debug')}" ironic::debug: "%{hiera('debug')}"
ironic::my_ip: {{LOCAL_IP}} ironic::my_ip: {{LOCAL_IP}}
ironic::db_online_data_migrations: true ironic::db_online_data_migrations: true
ironic::notification_driver: "%{hiera('notification_driver')}"
# TODO(dtantsur): remove when support for classic drivers is removed # TODO(dtantsur): remove when support for classic drivers is removed
ironic::db::online_data_migrations::migration_params: "--option migrate_to_hardware_types.reset_unsupported_interfaces=true" ironic::db::online_data_migrations::migration_params: "--option migrate_to_hardware_types.reset_unsupported_interfaces=true"
ironic::rpc_response_timeout: 600 ironic::rpc_response_timeout: 600
@ -669,6 +675,7 @@ horizon::openstack_endpoint_type: internalURL
# Mistral # Mistral
mistral::debug: "%{hiera('debug')}" mistral::debug: "%{hiera('debug')}"
mistral::notification_driver: "%{hiera('notification_driver')}"
mistral::api::bind_host: {{LOCAL_IP}} mistral::api::bind_host: {{LOCAL_IP}}
mistral::api::api_workers: "%{::os_workers}" mistral::api::api_workers: "%{::os_workers}"
mistral::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}} mistral::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
@ -766,6 +773,7 @@ cinder::keystone::authtoken::project_domain_name: "%{hiera('keystone_default_dom
cinder::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}} cinder::rabbit_userid: {{UNDERCLOUD_RABBIT_USERNAME}}
cinder::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}} cinder::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
cinder::rabbit_host: "{{LOCAL_IP_WRAPPED}}" cinder::rabbit_host: "{{LOCAL_IP_WRAPPED}}"
cinder::notification_driver: "%{hiera('notification_driver')}"
cinder::scheduler::scheduler_driver: cinder.scheduler.filter_scheduler.FilterScheduler cinder::scheduler::scheduler_driver: cinder.scheduler.filter_scheduler.FilterScheduler
cinder::setup_test_volume::size: '10280M' cinder::setup_test_volume::size: '10280M'
cinder::wsgi::apache::bind_host: {{LOCAL_IP}} cinder::wsgi::apache::bind_host: {{LOCAL_IP}}

View File

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