From 2f1b2433504bf1b3113c972fb8c8c09f9191c20c Mon Sep 17 00:00:00 2001 From: Bart Wensley Date: Wed, 6 Feb 2019 13:49:07 -0600 Subject: [PATCH] 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 --- nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_compute_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_compute_api.py b/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_compute_api.py index 2b2fd859..6bd842ec 100755 --- a/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_compute_api.py +++ b/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_compute_api.py @@ -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,