Configure VIM nova listener queue as HA

In the pre-kubernetes configuration, we had a single instance of
rabbitmq running, so the VIM configured a single non-HA queue
to listen for nova notifications. In the kubernetes configuration
there are two instances of rabbitmq running. The nova notification
queue is configured to be HA through a policy that matches names
starting with "notifications.". However, the VIM listener queue
is named nfvi_nova_listener_queue, so it does not match the
policy and is not configured to be HA. That means that when the
home rabbitmq node goes away (e.g. due to a controller reboot),
the VIM listener queue is no longer available, which causes
failures in the VIM.

The solution is to rename the VIM queue to:
notifications.nfvi_nova_listener_queue
This will ensure that it matches the nova policy and is configured
with the same HA parameters as the nova notification queue.

Change-Id: I958aadfa2da8f4aba9d18631ee0808fe97c42032
story: 2002843
task: 29380
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
This commit is contained in:
Bart Wensley 2019-02-06 13:49:07 -06:00
parent 97524fee3a
commit 2f1b243350
1 changed files with 4 additions and 1 deletions

View File

@ -3459,11 +3459,14 @@ class NFVIComputeAPI(nfvi.api.v1.NFVIComputeAPI):
self._directory = openstack.get_directory(
config, openstack.SERVICE_CATEGORY.OPENSTACK)
# The name of the listener queue must be prefixed with "notfications."
# to ensure the nova vhost policy matches it and configures it as an
# HA queue.
self._rpc_listener = rpc_listener.RPCListener(
config.CONF['amqp']['host'], config.CONF['amqp']['port'],
config.CONF['amqp']['user_id'], config.CONF['amqp']['password'],
config.CONF['amqp']['virt_host'], "nova", "notifications.info",
'nfvi_nova_listener_queue')
'notifications.nfvi_nova_listener_queue')
self._rpc_listener.add_message_handler(
nova.RPC_MESSAGE_TYPE.NOVA_SERVER_DELETE,