diff --git a/defaults/main.yml b/defaults/main.yml index 9eb804ec..3aaddd22 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -277,7 +277,22 @@ octavia_task_flow_max_workers: 5 octavia_event_streamer: True # Enable provisioning status sync with neutron db -octavia_sync_provisioning_status: False +octavia_sync_provisioning_status: True + +# OSA is architected to use vHosts for queues so we need to post events +# into the Neutron queue for them to be picked up +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_rabbitmq_password: changeme + +# For additional security use a different user on the Neutron queue +# for Octavia with restricted access to only the event streamer +# queues +octavia_neutron_rabbitmq_userid: "{{ neutron_rabbitmq_userid }}" +octavia_neutron_rabbitmq_password: "{{ neutron_rabbitmq_password }}" # this controls if Octavia should add an anti-affinity hint to make sure # two amphora are not placed pn the same host (the most common setup of diff --git a/releasenotes/notes/custom_eventstreamer_queue_url-a1dcd1f6769816c5.yaml b/releasenotes/notes/custom_eventstreamer_queue_url-a1dcd1f6769816c5.yaml new file mode 100644 index 00000000..b5c07d7a --- /dev/null +++ b/releasenotes/notes/custom_eventstreamer_queue_url-a1dcd1f6769816c5.yaml @@ -0,0 +1,16 @@ +--- +features: + - | + A typical OSA install will put the neutron and octavia queues on different + vhosts thus preventing the event streamer from working While Octavis is + streaming to its own queue the consumer on the neutron side listens to the + neutron queue. With a recent Octavia enhancement a separate queue for the + event streamer can be configured. This patch will set up the event streamer + to post into the neutron queue using neutron's credentials. Thus reaching + the consumer on the neutron-lbaas side and allowing for streaming. +security: + - | + Since we use neutron's credentials to access the queue, security conscious + people might want to set up an extra user for octavia on the neutron queue + restricted to the topics octavia posts to. + diff --git a/templates/octavia.conf.j2 b/templates/octavia.conf.j2 index 20bb62de..cce9946f 100644 --- a/templates/octavia.conf.j2 +++ b/templates/octavia.conf.j2 @@ -238,6 +238,12 @@ topic = octavia_prov # Topic for octavia's events sent to a queue event_stream_topic = neutron_lbaas_event +# Put it into the Neutron queue +{% if octavia_event_streamer|bool %} +event_stream_transport_url = rabbit://{% for host in neutron_rabbitmq_servers.split(',') %}{{ octavia_neutron_rabbitmq_userid }}:{{ octavia_neutron_rabbitmq_password }}@{{ host }}:{{ neutron_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ neutron_rabbitmq_vhost }}{% endif %}{% endfor %} +{% endif %} + + [house_keeping] # Interval in seconds to initiate spare amphora checks # spare_check_interval = 30