diff --git a/service/calico-dhcp-agent.yaml b/service/calico-dhcp-agent.yaml index 476e33b..2bb6a26 100644 --- a/service/calico-dhcp-agent.yaml +++ b/service/calico-dhcp-agent.yaml @@ -15,7 +15,8 @@ service: command: calico-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini dependencies: - neutron-db-sync - - rabbitmq + - "{{ messaging.dependencies[messaging.backend.rpc] }}" + - "{{ messaging.dependencies[messaging.backend.notifications] }}" files: - neutron.conf - ml2-conf.ini diff --git a/service/files/neutron.conf.j2 b/service/files/neutron.conf.j2 index 7b2c84c..8018f7c 100644 --- a/service/files/neutron.conf.j2 +++ b/service/files/neutron.conf.j2 @@ -43,14 +43,6 @@ endpoint_type = internal [oslo_concurrency] lock_path = /var/lib/neutron/tmp -[oslo_messaging_rabbit] -rabbit_userid = {{ rabbitmq.user }} -rabbit_password = {{ rabbitmq.password }} -rabbit_ha_queues = true -# Here we should have a list of RBMQ servers, but for now 1 is ok -# FIXME -rabbit_hosts = {{ address('rabbitmq', rabbitmq.port) }} - [agent] root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf root_helper_daemon = sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf @@ -70,9 +62,11 @@ username = {{ neutron.db.username }} password = {{ neutron.db.password }} memcached_servers = {{ address('memcached', memcached.port) }} -[oslo_messaging_notifications] {% if searchlight is defined and (searchlight.services.neutron or searchlight.services.nova) %} +[oslo_messaging_notifications] driver = {{ searchlight.notification_driver }} -{% else %} -driver = noop {% endif %} + +{# messaging macros templates #} +{{ oslo_messaging[messaging.backend.notifications]('notifications_config') }} +{{ oslo_messaging[messaging.backend.rpc]('rpc_config') }} diff --git a/service/neutron-dhcp-agent.yaml b/service/neutron-dhcp-agent.yaml index 3522440..0df854c 100644 --- a/service/neutron-dhcp-agent.yaml +++ b/service/neutron-dhcp-agent.yaml @@ -18,7 +18,8 @@ service: command: neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini dependencies: - neutron-db-sync - - rabbitmq + - "{{ messaging.dependencies[messaging.backend.rpc] }}" + - "{{ messaging.dependencies[messaging.backend.notifications] }}" files: - neutron.conf - ml2-conf.ini diff --git a/service/neutron-l3-agent.yaml b/service/neutron-l3-agent.yaml index d0e1a16..30a34eb 100644 --- a/service/neutron-l3-agent.yaml +++ b/service/neutron-l3-agent.yaml @@ -18,7 +18,8 @@ service: command: neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini dependencies: - neutron-db-sync - - rabbitmq + - "{{ messaging.dependencies[messaging.backend.rpc] }}" + - "{{ messaging.dependencies[messaging.backend.notifications] }}" files: - neutron.conf - ml2-conf.ini diff --git a/service/neutron-metadata-agent.yaml b/service/neutron-metadata-agent.yaml index a54e67f..0a56d73 100644 --- a/service/neutron-metadata-agent.yaml +++ b/service/neutron-metadata-agent.yaml @@ -17,7 +17,7 @@ service: command: neutron-metadata-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata-agent.ini dependencies: - neutron-db-sync - - rabbitmq + - "{{ messaging.dependencies[messaging.backend.rpc] }}" files: - neutron.conf - ml2-conf.ini diff --git a/service/neutron-openvswitch-agent.yaml b/service/neutron-openvswitch-agent.yaml index 3743c45..641cbe0 100644 --- a/service/neutron-openvswitch-agent.yaml +++ b/service/neutron-openvswitch-agent.yaml @@ -18,7 +18,8 @@ service: command: neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini dependencies: - neutron-db-sync - - rabbitmq + - "{{ messaging.dependencies[messaging.backend.rpc] }}" + - "{{ messaging.dependencies[messaging.backend.notifications] }}" - openvswitch-vswitchd:local files: - neutron.conf diff --git a/service/neutron-server.yaml b/service/neutron-server.yaml index 22f22c7..d3a37eb 100644 --- a/service/neutron-server.yaml +++ b/service/neutron-server.yaml @@ -20,7 +20,8 @@ service: type: single command: neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head dependencies: - - rabbitmq + - "{{ messaging.dependencies[messaging.backend.rpc] }}" + - "{{ messaging.dependencies[messaging.backend.notifications] }}" - neutron-db-create files: - neutron.conf