From 4db9c95d6f7ec040abc973e531a6dd95e147491f Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Mon, 23 Apr 2018 16:34:44 -0400 Subject: [PATCH] Update to use oslo.messaging service for RPC and Notify This introduces oslo.messaging variables that define the RPC and Notify transports for the OpenStack services. These parameters replace the rabbitmq values and are used to generate the messaging transport_url for the service. The association of the messaging backend server to the oslo.messaging services will then be transparent to the neutron service. This patch: * Add oslo.messaging variables for RPC and Notify to defaults * Update transport_url generation * Add oslo.messaging to tests inventories * Add release note Depends-On: If4326a6848d2d32af284fdbb94798eb0b03734d5 Depends-On: I2b09145b60116c029fc85477399c24f94974b61d Change-Id: I717880458f69870acf75a101481b7776d250ebf4 --- defaults/main.yml | 38 ++++++++++++------- ...ng-separate-backends-9b3fcaaa21a0d9f4.yaml | 19 ++++++++++ templates/neutron.conf.j2 | 5 +-- tests/calico_inventory | 6 +++ tests/dragonflow_inventory | 6 +++ tests/lxb_inventory | 6 +++ tests/opendaylight_inventory | 6 +++ tests/ovs_inventory | 6 +++ 8 files changed, 75 insertions(+), 17 deletions(-) create mode 100644 releasenotes/notes/oslo-messaging-separate-backends-9b3fcaaa21a0d9f4.yaml diff --git a/defaults/main.yml b/defaults/main.yml index de807937..ecbdea0e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -192,14 +192,32 @@ neutron_galera_use_ssl: "{{ galera_use_ssl | default(False) }}" neutron_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/galera-ca.pem') }}" ### -### RPC (RabbitMQ) integration +### Oslo Messaging +### + +# RPC + +neutron_oslomsg_rpc_transport: rabbit +neutron_oslomsg_rpc_servers: 127.0.0.1 +neutron_oslomsg_rpc_port: 5672 +neutron_oslomsg_rpc_use_ssl: False +neutron_oslomsg_rpc_userid: neutron +neutron_oslomsg_rpc_vhost: /neutron + +# Notify + +neutron_oslomsg_notify_transport: rabbit +neutron_oslomsg_notify_servers: 127.0.0.1 +neutron_oslomsg_notify_port: 5672 +neutron_oslomsg_notify_use_ssl: False +neutron_oslomsg_notify_userid: neutron +neutron_oslomsg_notify_vhost: /neutron + + +### +### (RabbitMQ) integration ### -neutron_rabbitmq_userid: neutron -neutron_rabbitmq_vhost: /neutron -neutron_rabbitmq_port: 5672 -neutron_rabbitmq_servers: 127.0.0.1 -neutron_rabbitmq_use_ssl: False neutron_rpc_thread_pool_size: 64 neutron_rpc_conn_pool_size: 30 neutron_rpc_response_timeout: 60 @@ -239,14 +257,6 @@ neutron_service_in_ldap: false neutron_ceilometer_enabled: False -# Configuration for notifications communication, i.e. [oslo_messaging_notifications] -neutron_rabbitmq_telemetry_userid: "{{ neutron_rabbitmq_userid }}" -neutron_rabbitmq_telemetry_password: "{{ neutron_rabbitmq_password }}" -neutron_rabbitmq_telemetry_vhost: "{{ neutron_rabbitmq_vhost }}" -neutron_rabbitmq_telemetry_port: "{{ neutron_rabbitmq_port }}" -neutron_rabbitmq_telemetry_servers: "{{ neutron_rabbitmq_servers }}" -neutron_rabbitmq_telemetry_use_ssl: "{{ neutron_rabbitmq_use_ssl }}" - ### ### Designate integration ### diff --git a/releasenotes/notes/oslo-messaging-separate-backends-9b3fcaaa21a0d9f4.yaml b/releasenotes/notes/oslo-messaging-separate-backends-9b3fcaaa21a0d9f4.yaml new file mode 100644 index 00000000..67e69729 --- /dev/null +++ b/releasenotes/notes/oslo-messaging-separate-backends-9b3fcaaa21a0d9f4.yaml @@ -0,0 +1,19 @@ +--- +features: + - Support separate oslo.messaging services for RPC and Notifications + to enable operation of separate and different messaging backend servers. +deprecations: + - | + The rabbitmq server parameters have been replaced by corresponding + oslo.messaging RPC and Notify parameters in order to abstract the + messaging service from the actual backend server deployment. + - neutron_oslomsg_rpc_servers replaces neutron_rabbitmq_servers + - neutron_oslomsg_rpc_port replaces neutron_rabbitmq_port + - neutron_oslomsg_rpc_use_ssl replaces neutron_rabbitmq_use_ssl + - neutron_oslomsg_rpc_userid replaces neutron_rabbitmq_userid + - neutron_oslomsg_rpc_vhost replaces neutron_rabbitmq_vhost + - neutron_oslomsg_notify_servers replaces neutron_rabbitmq_telemetry_servers + - neutron_oslomsg_notify_port replaces neutron_rabbitmq_telemetry_port + - neutron_oslomsg_notify_use_ssl replaces neutron_rabbitmq_telemetry_use_ssl + - neutron_oslomsg_notify_userid replaces neutron_rabbitmq_telemetry_userid + - neutron_oslomsg_notify_vhost replaces neutron_rabbitmq_telemetry_vhost diff --git a/templates/neutron.conf.j2 b/templates/neutron.conf.j2 index d8224cd4..568343bc 100644 --- a/templates/neutron.conf.j2 +++ b/templates/neutron.conf.j2 @@ -26,7 +26,7 @@ log_file = {{ neutron_log_dir }}/neutron.log ## Rpc all executor_thread_pool_size = {{ neutron_rpc_thread_pool_size }} rpc_response_timeout = {{ neutron_rpc_response_timeout }} -transport_url = rabbit://{% for host in neutron_rabbitmq_servers.split(',') %}{{ neutron_rabbitmq_userid }}:{{ neutron_rabbitmq_password }}@{{ host }}:{{ neutron_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ neutron_rabbitmq_vhost }}{% endif %}{% endfor %} +transport_url = {{ neutron_oslomsg_rpc_transport }}://{% for host in neutron_oslomsg_rpc_servers.split(',') %}{{ neutron_oslomsg_rpc_userid }}:{{ neutron_oslomsg_rpc_password }}@{{ host }}:{{ neutron_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ neutron_oslomsg_rpc_vhost }}{% if neutron_oslomsg_rpc_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} # Domain to use for building hostnames dns_domain = {{ neutron_dns_domain }} @@ -250,7 +250,6 @@ root_helper = sudo {{ neutron_bin }}/neutron-rootwrap {{ neutron_conf_dir }}/roo # Messaging [oslo_messaging_rabbit] -ssl = {{ neutron_rabbitmq_use_ssl }} rpc_conn_pool_size = {{ neutron_rpc_conn_pool_size }} # Notifications @@ -265,7 +264,7 @@ rpc_conn_pool_size = {{ neutron_rpc_conn_pool_size }} {% endif %} notification_topics = {{ notification_topics | join(',') }} driver = messagingv2 -transport_url = rabbit://{% for host in neutron_rabbitmq_telemetry_servers.split(',') %}{{ neutron_rabbitmq_telemetry_userid }}:{{ neutron_rabbitmq_telemetry_password }}@{{ host }}:{{ neutron_rabbitmq_telemetry_port }}{% if not loop.last %},{% else %}/{{ neutron_rabbitmq_telemetry_vhost }}{% endif %}{% endfor %} +transport_url = {{ neutron_oslomsg_notify_transport }}://{% for host in neutron_oslomsg_notify_servers.split(',') %}{{ neutron_oslomsg_notify_userid }}:{{ neutron_oslomsg_notify_password }}@{{ host }}:{{ neutron_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ neutron_oslomsg_notify_vhost }}{% if neutron_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} {% endif %} # Concurrency (locking mechanisms) diff --git a/tests/calico_inventory b/tests/calico_inventory index 344e41e9..471a1fa8 100644 --- a/tests/calico_inventory +++ b/tests/calico_inventory @@ -16,6 +16,12 @@ server2 agents1 agents2 +[oslomsg_rpc_all] +infra1 + +[oslomsg_notify_all] +infra1 + [rabbitmq_all] infra1 diff --git a/tests/dragonflow_inventory b/tests/dragonflow_inventory index 0fe75e3c..800809e7 100644 --- a/tests/dragonflow_inventory +++ b/tests/dragonflow_inventory @@ -16,6 +16,12 @@ server2 agents1 agents2 +[oslomsg_rpc_all] +infra1 + +[oslomsg_notify_all] +infra1 + [rabbitmq_all] infra1 diff --git a/tests/lxb_inventory b/tests/lxb_inventory index b10413e1..9af7a00b 100644 --- a/tests/lxb_inventory +++ b/tests/lxb_inventory @@ -16,6 +16,12 @@ server2 agents1 agents2 +[oslomsg_rpc_all] +infra1 + +[oslomsg_notify_all] +infra1 + [rabbitmq_all] infra1 diff --git a/tests/opendaylight_inventory b/tests/opendaylight_inventory index 066b9900..59710419 100644 --- a/tests/opendaylight_inventory +++ b/tests/opendaylight_inventory @@ -16,6 +16,12 @@ server2 agents1 agents2 +[oslomsg_rpc_all] +infra1 + +[oslomsg_notify_all] +infra1 + [rabbitmq_all] infra1 diff --git a/tests/ovs_inventory b/tests/ovs_inventory index d15f929f..06e1d33c 100644 --- a/tests/ovs_inventory +++ b/tests/ovs_inventory @@ -16,6 +16,12 @@ server2 agents1 agents2 +[oslomsg_rpc_all] +infra1 + +[oslomsg_notify_all] +infra1 + [rabbitmq_all] infra1