Update notification config >= mitaka

Use oslo_messaging_notifications for mitaka or later releases
including setting the transport_url to the value provided by
the AMQP context.

This removes use of deprecated configuration options for
ceilometer notifications.

Change-Id: Ic363af31b5e74ae0830e4d3213ce21231a332773
This commit is contained in:
James Page 2017-07-11 12:02:09 +01:00
parent 500863cedf
commit a14eaa5eeb
4 changed files with 10 additions and 20 deletions

View File

@ -789,6 +789,9 @@ class Hooks(object):
def charm_dir():
"""Return the root directory of the current charm"""
d = os.environ.get('JUJU_CHARM_DIR')
if d is not None:
return d
return os.environ.get('CHARM_DIR')

View File

@ -17,11 +17,6 @@ state_path = /var/lib/cinder
volumes_dir = /var/lib/cinder/volumes
osapi_volume_workers = {{ workers }}
{% if rabbitmq_host or rabbitmq_hosts -%}
notification_driver = cinder.openstack.common.notifier.rpc_notifier
control_exchange = cinder
{% endif -%}
{% if volume_driver -%}
volume_driver = {{ volume_driver }}
{% endif -%}
@ -72,6 +67,8 @@ volume_usage_audit_period = {{ volume_usage_audit_period }}
{% include "section-rabbitmq-oslo" %}
{% include "section-oslo-notifications" %}
[oslo_concurrency]
lock_path = /var/lock/cinder
@ -79,8 +76,3 @@ lock_path = /var/lock/cinder
# XXX: hack to work around http://pad.lv/1516085
# will be superceeded by SRU to cinder package
encryption_auth_url = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/v3
[oslo_messaging_notifications]
# .openstack.common.* is pre-icehouse option.
# Check change-id: I90dff1b5c2a7dd2943cfa7ff25bb63c08eb7986d
driver = messagingv2

View File

@ -14,11 +14,6 @@ auth_strategy = keystone
state_path = /var/lib/cinder
osapi_volume_workers = {{ workers }}
{% if rabbitmq_host or rabbitmq_hosts -%}
notification_driver = cinder.openstack.common.notifier.rpc_notifier
control_exchange = cinder
{% endif -%}
{% if use_internal_endpoints -%}
swift_catalog_info = object-store:swift:internalURL
keystone_catalog_info = identity:Identity Service:internalURL
@ -58,6 +53,8 @@ volume_usage_audit_period = {{ volume_usage_audit_period }}
{% include "section-rabbitmq-oslo" %}
{% include "section-oslo-notifications" %}
[oslo_concurrency]
lock_path = /var/lock/cinder
@ -65,8 +62,3 @@ lock_path = /var/lock/cinder
# XXX: hack to work around http://pad.lv/1516085
# will be superceeded by SRU to cinder package
encryption_auth_url = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/v3
[oslo_messaging_notifications]
# .openstack.common.* is pre-icehouse option.
# Check change-id: I90dff1b5c2a7dd2943cfa7ff25bb63c08eb7986d
driver = messagingv2

View File

@ -789,6 +789,9 @@ class Hooks(object):
def charm_dir():
"""Return the root directory of the current charm"""
d = os.environ.get('JUJU_CHARM_DIR')
if d is not None:
return d
return os.environ.get('CHARM_DIR')