Improve event streaming with a better Octavia verison

In a newer Octavia version we can specify the transport_url for
the event streamer which listens on the neutron rabbit vhost.
This configures that and also enables provisonal status streaming by
default.

Depends-On: I00422b93d3ecfb672e967c2019424b64bc44ba66

Change-Id: I8bee145d5517c66c95bb24ba62cf6f7ed497df2d
This commit is contained in:
German Eichberger 2017-10-24 15:30:53 -07:00
parent 6b13c93e4a
commit 6f7128bb44
3 changed files with 38 additions and 1 deletions

View File

@ -277,7 +277,22 @@ octavia_task_flow_max_workers: 5
octavia_event_streamer: True octavia_event_streamer: True
# Enable provisioning status sync with neutron db # 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 # 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 # two amphora are not placed pn the same host (the most common setup of

View File

@ -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.

View File

@ -238,6 +238,12 @@ topic = octavia_prov
# Topic for octavia's events sent to a queue # Topic for octavia's events sent to a queue
event_stream_topic = neutron_lbaas_event 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] [house_keeping]
# Interval in seconds to initiate spare amphora checks # Interval in seconds to initiate spare amphora checks
# spare_check_interval = 30 # spare_check_interval = 30