diff --git a/hooks/charmhelpers/core/hookenv.py b/hooks/charmhelpers/core/hookenv.py index fe7fd8c0..814a9354 100644 --- a/hooks/charmhelpers/core/hookenv.py +++ b/hooks/charmhelpers/core/hookenv.py @@ -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') diff --git a/templates/mitaka/cinder.conf b/templates/mitaka/cinder.conf index f925395f..12981476 100644 --- a/templates/mitaka/cinder.conf +++ b/templates/mitaka/cinder.conf @@ -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 diff --git a/templates/ocata/cinder.conf b/templates/ocata/cinder.conf index fa9d4134..00edc412 100644 --- a/templates/ocata/cinder.conf +++ b/templates/ocata/cinder.conf @@ -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 diff --git a/tests/charmhelpers/core/hookenv.py b/tests/charmhelpers/core/hookenv.py index fe7fd8c0..814a9354 100644 --- a/tests/charmhelpers/core/hookenv.py +++ b/tests/charmhelpers/core/hookenv.py @@ -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')