diff --git a/defaults/main.yml b/defaults/main.yml index 04c4a83a..3ebea0ea 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -98,6 +98,24 @@ nova_api_db_pool_timeout: 30 nova_cell0_database: "nova_cell0" nova_cell1_name: "cell1" +## Oslo Messaging + +# RPC +nova_oslomsg_rpc_transport: rabbit +nova_oslomsg_rpc_servers: 127.0.0.1 +nova_oslomsg_rpc_port: 5672 +nova_oslomsg_rpc_use_ssl: False +nova_oslomsg_rpc_userid: nova +nova_oslomsg_rpc_vhost: /nova + +# Notify +nova_oslomsg_notify_transport: rabbit +nova_oslomsg_notify_servers: 127.0.0.1 +nova_oslomsg_notify_port: 5672 +nova_oslomsg_notify_use_ssl: False +nova_oslomsg_notify_userid: nova +nova_oslomsg_notify_vhost: /nova + ## RabbitMQ info ## Configuration for RPC communications @@ -105,21 +123,6 @@ nova_rpc_thread_pool_size: 64 nova_rpc_conn_pool_size: 30 nova_rpc_response_timeout: 60 -nova_rabbitmq_servers: 127.0.0.1 -nova_rabbitmq_port: 5672 -nova_rabbitmq_userid: nova -nova_rabbitmq_vhost: /nova -nova_rabbitmq_use_ssl: False - -## Configuration for notifications communication, i.e. [oslo_messaging_notifications] -nova_rabbitmq_telemetry_userid: "{{ nova_rabbitmq_userid }}" -nova_rabbitmq_telemetry_password: "{{ nova_rabbitmq_password }}" -nova_rabbitmq_telemetry_vhost: "{{ nova_rabbitmq_vhost }}" -nova_rabbitmq_telemetry_port: "{{ nova_rabbitmq_port }}" -nova_rabbitmq_telemetry_servers: "{{ nova_rabbitmq_servers }}" -nova_rabbitmq_telemetry_use_ssl: "{{ nova_rabbitmq_use_ssl }}" - - ## Nova virtualization Types # The nova_virt_types dictionary contains global overrides used for # specific compute types. Every variable inside of this dictionary diff --git a/releasenotes/notes/oslo-messaging-separate-backends-1fbdb77e93e29542.yaml b/releasenotes/notes/oslo-messaging-separate-backends-1fbdb77e93e29542.yaml new file mode 100644 index 00000000..17464432 --- /dev/null +++ b/releasenotes/notes/oslo-messaging-separate-backends-1fbdb77e93e29542.yaml @@ -0,0 +1,20 @@ +--- +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. + - nova_oslomsg_rpc_servers replaces nova_rabbitmq_servers + - nova_oslomsg_rpc_port replaces nova_rabbitmq_port + - nova_oslomsg_rpc_use_ssl replaces nova_rabbitmq_use_ssl + - nova_oslomsg_rpc_userid replaces nova_rabbitmq_userid + - nova_oslomsg_rpc_vhost replaces nova_rabbitmq_vhost + - nova_oslomsg_notify_servers replaces nova_rabbitmq_telemetry_servers + - nova_oslomsg_notify_port replaces nova_rabbitmq_telemetry_port + - nova_oslomsg_notify_use_ssl replaces nova_rabbitmq_telemetry_use_ssl + - nova_oslomsg_notify_userid replaces nova_rabbitmq_telemetry_userid + - nova_oslomsg_notify_vhost replaces nova_rabbitmq_telemetry_vhost + - nova_oslomsg_notify_password replaces nova_rabbitmq_telemetry_password diff --git a/tasks/nova_db_setup.yml b/tasks/nova_db_setup.yml index defa0cf3..87b01ae0 100644 --- a/tasks/nova_db_setup.yml +++ b/tasks/nova_db_setup.yml @@ -60,7 +60,7 @@ {{ nova_bin }}/nova-manage cell_v2 create_cell --name {{ nova_cell1_name }} --database_connection mysql+pymysql://{{ nova_galera_user }}:{{ nova_container_mysql_password }}@{{ nova_galera_address }}/{{ nova_galera_database }}?charset=utf8 - --transport-url rabbit://{% for host in nova_rabbitmq_servers.split(',') %}{{ nova_rabbitmq_userid }}:{{ nova_rabbitmq_password }}@{{ host }}:{{ nova_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ nova_rabbitmq_vhost }}{% endif %}{% endfor %} + --transport-url {{ nova_oslomsg_rpc_transport }}://{% for host in nova_oslomsg_rpc_servers.split(',') %}{{ nova_oslomsg_rpc_userid }}:{{ nova_oslomsg_rpc_password }}@{{ host }}:{{ nova_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ nova_oslomsg_rpc_vhost }}{% endif %}{% endfor %} become: yes become_user: "{{ nova_system_user_name }}" register: nova_cell1_create diff --git a/templates/nova.conf.j2 b/templates/nova.conf.j2 index 4f557085..017fe573 100644 --- a/templates/nova.conf.j2 +++ b/templates/nova.conf.j2 @@ -41,7 +41,7 @@ enabled_apis = {{ nova_enabled_apis }} osapi_compute_workers = {{ nova_osapi_compute_workers | default(nova_api_threads) }} # Rpc all -transport_url = rabbit://{% for host in nova_rabbitmq_servers.split(',') %}{{ nova_rabbitmq_userid }}:{{ nova_rabbitmq_password }}@{{ host }}:{{ nova_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ nova_rabbitmq_vhost }}{% endif %}{% endfor %} +transport_url = {{ nova_oslomsg_rpc_transport }}://{% for host in nova_oslomsg_rpc_servers.split(',') %}{{ nova_oslomsg_rpc_userid }}:{{ nova_oslomsg_rpc_password }}@{{ host }}:{{ nova_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ nova_oslomsg_rpc_vhost }}{% if nova_oslomsg_rpc_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} executor_thread_pool_size = {{ nova_rpc_thread_pool_size }} rpc_response_timeout = {{ nova_rpc_response_timeout }} @@ -93,7 +93,7 @@ notify_on_state_change = vm_and_task_state {% endif %} notification_topics = {{ notification_topics | join(',') }} driver = messagingv2 -transport_url = rabbit://{% for host in nova_rabbitmq_telemetry_servers.split(',') %}{{ nova_rabbitmq_telemetry_userid }}:{{ nova_rabbitmq_telemetry_password }}@{{ host }}:{{ nova_rabbitmq_telemetry_port }}{% if not loop.last %},{% else %}/{{ nova_rabbitmq_telemetry_vhost }}{% endif %}{% endfor %} +transport_url = {{ nova_oslomsg_notify_transport }}://{% for host in nova_oslomsg_notify_servers.split(',') %}{{ nova_oslomsg_notify_userid }}:{{ nova_oslomsg_notify_password }}@{{ host }}:{{ nova_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ nova_oslomsg_notify_vhost }}{% if nova_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} {% endif %} # Cache @@ -236,7 +236,6 @@ lock_path = {{ nova_lock_path }} [oslo_messaging_rabbit] -ssl = {{ nova_rabbitmq_use_ssl }} rpc_conn_pool_size = {{ nova_rpc_conn_pool_size }} diff --git a/tests/inventory b/tests/inventory index 05ef0a0f..e651cd96 100644 --- a/tests/inventory +++ b/tests/inventory @@ -7,6 +7,12 @@ openstack1 infra1 openstack1 +[oslomsg_rpc_all] +infra1 + +[oslomsg_notify_all] +infra1 + [rabbitmq_all] infra1