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: I66188d7275a84efd7aea4482db88b20983fe671f
This commit is contained in:
parent
9fe6a51011
commit
faa89dee7b
|
@ -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')
|
||||
|
||||
|
||||
|
|
|
@ -35,10 +35,6 @@ show_image_direct_url = {{ expose_image_locations }}
|
|||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if rabbitmq_host or rabbitmq_hosts -%}
|
||||
notification_driver = messagingv2
|
||||
{% endif -%}
|
||||
|
||||
delayed_delete = False
|
||||
scrub_time = 43200
|
||||
scrubber_datadir = /var/lib/glance/scrubber
|
||||
|
@ -91,4 +87,6 @@ flavor = keystone
|
|||
|
||||
{% include "section-rabbitmq-oslo" %}
|
||||
|
||||
{% include "section-oslo-notifications" %}
|
||||
|
||||
{% include "parts/section-storage" %}
|
||||
|
|
|
@ -479,7 +479,21 @@ class GlanceBasicDeployment(OpenStackAmuletDeployment):
|
|||
'idle_timeout': '3600',
|
||||
'connection': db_uri
|
||||
}
|
||||
expected['DEFAULT']['notification_driver'] = 'messagingv2'
|
||||
|
||||
if self._get_openstack_release() >= self.trusty_mitaka:
|
||||
del expected['DEFAULT']['notification_driver']
|
||||
connection_uri = (
|
||||
"rabbit://glance:{}@{}:5672/"
|
||||
"openstack".format(rel_mq_gl['password'],
|
||||
rel_mq_gl['hostname'])
|
||||
)
|
||||
expected['oslo_messaging_notifications'] = {
|
||||
'driver': 'messagingv2',
|
||||
'transport_url': connection_uri
|
||||
}
|
||||
else:
|
||||
expected['DEFAULT']['notification_driver'] = 'messagingv2'
|
||||
|
||||
else:
|
||||
# Juno or earlier
|
||||
expected['DEFAULT'].update({
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue