[Starlingx-discuss] Does rabbitmq listener work in NFV module

Wensley, Barton Barton.Wensley at windriver.com
Thu Apr 18 12:19:34 UTC 2019


Zhipeng,

First, I don’t think you should be basing your new pci-interrupt-affinity service on any of the nfv-vim code. I have added a comment to https://review.openstack.org/#/c/640264 to explain. We can discuss more in the context of that review.

To answer your questions below, you cannot access hieradata directly and you should not be using any of the nfv-vim configuration. I think the right way for you to get the rabbitmq configuration to your new service would be by creating a new puppet module which would create a new configuration file for your service (e.g. /etc/pci-interrupt-affinity/pci-interrupt-affinity.conf). You can use the puppet-nfv puppet module as an example and you can see in sysinv/puppet/nfv.py how the rabbit configuration is being retrieved from the helm data for nova - this would be similar to the code you have below, but would be running in the sysinv-conductor process as it prepares the hieradata for your new service.

Bart

From: Liu, ZhipengS [mailto:zhipengs.liu at intel.com]
Sent: April 18, 2019 5:17 AM
To: Wensley, Barton; starlingx-discuss at lists.starlingx.io
Subject: RE: [Starlingx-discuss] Does rabbitmq listener work in NFV module

Hi Bart,

Thanks!  It exactly works in nfv.

I still have a question about Rabbitmq access.

Currently, I’m working on pci-interrupt-affinity service which will run on every worker node.
It need to listen to rabbitmq to get notifications from nova
Before containerized version, I can use configurations in /etc/sysinv/sysinv.conf to get connect to rabbitmq.
Now, if I use below configuration, it can work.
/opt/platform/puppet/19.01/hieradata/system.yaml
nfv::nfvi::platform_username: admin
nfv::nfvi::rabbit_host: rabbitmq.openstack.svc.cluster.local
nfv::nfvi::rabbit_password: 28a5834cf803Ti0*
nfv::nfvi::rabbit_port: 5672
nfv::nfvi::rabbit_userid: nova-rabbitmq-user
nfv::nfvi::rabbit_virtual_host: nova

Then, I tried to add below code to get above configuration. But it didn’t work.
“Utils.is_openstack_installed” this check failed! And also cannot get “helm_data”

Who can help?  Any comment or proposal on it?
BTW, can I get these configuration from
/opt/platform/puppet/19.01/hieradata/system.yaml directly? Is it reasonable?


===================================================================
from sysinv.helm import helm
from sysinv.common import utils
from sysinv.db import api as db_api
...

dbapi = db_api.get_instance()
if dbapi and utils.is_openstack_installed(dbapi):
    helm_data = helm.HelmOperatorData(dbapi)
    nova_oslo_messaging_data = helm_data.get_nova_oslo_messaging_data()
    rabbit_cfg['rabbit_host'] = nova_oslo_messaging_data['host']
    rabbit_cfg['rabbit_userid'] = nova_oslo_messaging_data['username']
    rabbit_cfg['rabbit_password'] = nova_oslo_messaging_data['password']
rabbit_cfg['rabbit_virtual_host'] = nova_oslo_messaging_data['virt_host']


Thanks!
Zhipeng

From: Wensley, Barton [mailto:Barton.Wensley at windriver.com]
Sent: 2019年4月17日 20:24
To: Liu, ZhipengS <zhipengs.liu at intel.com>; starlingx-discuss at lists.starlingx.io
Subject: RE: [Starlingx-discuss] Does rabbitmq listener work in NFV module

Zhipeng,

These logs are normal in cases where the containerized rabbitmq servers are temporarily unavailable (i.e. the osh-openstack-rabbitmq-rabbitmq-0/1 pods). This can happen when a controller is locked or rebooted. The VIM should automatically re-connect to the rabbitmq servers - this could take anywhere from a few seconds to as long as a minute or two depending on the reason the rabbitmq server(s) were not available.

Bart

From: Liu, ZhipengS [mailto:zhipengs.liu at intel.com]
Sent: April 17, 2019 6:46 AM
To: starlingx-discuss at lists.starlingx.io<mailto:starlingx-discuss at lists.starlingx.io>
Subject: [Starlingx-discuss] Does rabbitmq listener work in NFV module

Hi all,

>From nfv-vim.log I see below
2019-04-12T08:38:11.409 controller-0                           VIM_Thread[31835]     INFO                            rpc_listener.py.127   RPC-Listener not connected to exchange nova, queue=notifications.nfvi_nova_listener_queue.

It seems NFV could not get notifications from nova now.
Have we enabled rabbitmq listener in NFV after containerized version?

Thanks!
zhipeng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.starlingx.io/pipermail/starlingx-discuss/attachments/20190418/5262dc97/attachment-0001.html>


More information about the Starlingx-discuss mailing list