Allow passing arguments to RabbitMQ server

Adds rabbitmq_server_additional_erl_args variable which
is appended to RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS
environment variable to RabbitMQ server startup script.

This can be used to configure the schedulers.

Docs attached.

Change-Id: Id683c8cc6dac61354ffd94f3b460335b42136ba2
Co-authored-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Related-bug: #1846467
This commit is contained in:
Jan Vondra 2019-10-03 12:01:00 +02:00 committed by Radosław Piliszek
parent 8915d8a538
commit 9137828b97
7 changed files with 52 additions and 1 deletions

View File

@ -70,3 +70,4 @@ rabbitmq_user: "openstack"
rabbitmq_cluster_name: "openstack"
rabbitmq_hostname: "{{ ansible_hostname }}"
rabbitmq_pid_file: "/var/lib/rabbitmq/mnesia/rabbitmq.pid"
rabbitmq_server_additional_erl_args: ""

View File

@ -2,7 +2,7 @@ RABBITMQ_NODENAME=rabbit@{{ ansible_hostname }}
RABBITMQ_LOG_BASE=/var/log/kolla/{{ project_name }}
RABBITMQ_DIST_PORT={{ role_rabbitmq_cluster_port }}
RABBITMQ_PID_FILE={{ rabbitmq_pid_file }}
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-kernel inetrc '/etc/rabbitmq/erl_inetrc' {% if api_address_family == 'ipv6' %}-proto_dist inet6_tcp {% endif %}"
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-kernel inetrc '/etc/rabbitmq/erl_inetrc' {% if api_address_family == 'ipv6' %}-proto_dist inet6_tcp {% endif %}{{ rabbitmq_server_additional_erl_args }}"
RABBITMQ_CTL_ERL_ARGS="{% if api_address_family == 'ipv6' %}-proto_dist inet6_tcp {% endif %}"
export ERL_EPMD_ADDRESS={{ api_interface_address }}

View File

@ -14,5 +14,6 @@ Projects Deployment Configuration Reference
logging-and-monitoring/index
containers/index
databases/index
message-queues/index
deployment-config/index
deployment-and-bootstrapping/index

View File

@ -0,0 +1,10 @@
==============
Message queues
==============
This section describes configuration of message queue services.
.. toctree::
:maxdepth: 1
rabbitmq

View File

@ -0,0 +1,22 @@
.. _rabbitmq:
========
RabbitMQ
========
RabbitMQ is a message broker written in Erlang.
It is currently the default provider of message queues in Kolla Ansible
deployments.
Passing arguments to RabbitMQ server's Erlang VM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Erlang programs run in Erlang VM (virtual machine) and use Erlang runtime.
Erlang VM can be configured.
Kolla Ansible makes it possible to pass arguments to the Erlang VM via the
usage of ``rabbitmq_server_additional_erl_args`` variable. The contents of it
are appended to ``RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS`` environment variable
passed to RabbitMQ server startup script. Kolla Ansible already configures
RabbitMQ server for IPv6 (if necessary). Any argument can be passed there as
documented in https://www.rabbitmq.com/runtime.html

View File

@ -350,6 +350,16 @@
#enable_zookeeper: "{{ enable_kafka | bool }}"
#enable_zun: "no"
##################
# RabbitMQ options
##################
# Options passed to RabbitMQ server startup script via the
# RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS environment var.
# See Kolla Ansible docs RabbitMQ section for details.
# These are appended to args already provided by Kolla Ansible
# to configure IPv6 in RabbitMQ server.
#rabbitmq_server_additional_erl_args: ""
##############
# Ceph options
##############

View File

@ -0,0 +1,7 @@
---
features:
- |
It is now possible to pass ``RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS``
to RabbitMQ server's Erlang VM via the newly introduced
``rabbitmq_server_additional_erl_args`` variable.
See Kolla Ansible docs RabbitMQ section for details.