<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Microsoft YaHei";
panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"MS PGothic";
panose-1:2 11 6 0 7 2 5 8 2 4;}
@font-face
{font-family:"\@Microsoft YaHei";
panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
{font-family:"\@MS PGothic";
panose-1:2 11 6 0 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:JA;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:ZH-CN">Hi Barton,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:ZH-CN">Thanks for your great comment!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:ZH-CN">I have updated my patch to use oslo api instead of nfv-common related code.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:ZH-CN">As for fetching rabbitmq configuration, I will try to do it according to your proposal.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:ZH-CN">Thanks!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:ZH-CN">Zhipeng<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><a name="_____replyseparator"></a><b>From:</b> Wensley, Barton [mailto:Barton.Wensley@windriver.com]
<br>
<b>Sent:</b> 2019<span lang="JA" style="font-family:"MS PGothic",sans-serif">年</span>4<span lang="JA" style="font-family:"MS PGothic",sans-serif">月</span>18<span lang="JA" style="font-family:"MS PGothic",sans-serif">日</span> 20:20<br>
<b>To:</b> Liu, ZhipengS <zhipengs.liu@intel.com>; starlingx-discuss@lists.starlingx.io<br>
<b>Subject:</b> RE: [Starlingx-discuss] Does rabbitmq listener work in NFV module<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Zhipeng,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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
<a href="https://review.openstack.org/#/c/640264">https://review.openstack.org/#/c/640264</a> to explain. We can discuss more in the context of that review.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Bart<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif"> Liu, ZhipengS [<a href="mailto:zhipengs.liu@intel.com">mailto:zhipengs.liu@intel.com</a>]
<br>
<b>Sent:</b> April 18, 2019 5:17 AM<br>
<b>To:</b> Wensley, Barton; <a href="mailto:starlingx-discuss@lists.starlingx.io">
starlingx-discuss@lists.starlingx.io</a><br>
<b>Subject:</b> RE: [Starlingx-discuss] Does rabbitmq listener work in NFV module<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Hi Bart,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks! It exactly works in nfv.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I still have a question about Rabbitmq access.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Currently, I’m working on pci-interrupt-affinity service which will run on every worker node.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">It need to listen to rabbitmq to get notifications from nova<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Before containerized version, I can use configurations in /etc/sysinv/sysinv.conf to get connect to rabbitmq.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Now, if I use below configuration, it can work.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">/opt/platform/puppet/19.01/hieradata/system.yaml<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">nfv::nfvi::platform_username: admin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">nfv::nfvi::rabbit_host: rabbitmq.openstack.svc.cluster.local<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">nfv::nfvi::rabbit_password: 28a5834cf803Ti0*<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">nfv::nfvi::rabbit_port: 5672<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">nfv::nfvi::rabbit_userid: nova-rabbitmq-user<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">nfv::nfvi::rabbit_virtual_host: nova<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Then, I tried to add below code to get above configuration. But it didn’t work.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">“Utils.is_openstack_installed” this check failed! And also cannot get “helm_data”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="color:#1F497D">Who can help? Any comment or proposal on it?
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="color:#1F497D">BTW, can I get these configuration from<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="color:#1F497D">/opt/platform/puppet/19.01/hieradata/system.yaml directly? Is it reasonable?<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">===================================================================<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">from sysinv.helm import helm<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">from sysinv.common import utils<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">from sysinv.db import api as db_api<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">dbapi = db_api.get_instance()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">if dbapi and utils.is_openstack_installed(dbapi):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> helm_data = helm.HelmOperatorData(dbapi)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> nova_oslo_messaging_data = helm_data.get_nova_oslo_messaging_data()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> rabbit_cfg['rabbit_host'] = nova_oslo_messaging_data['host']<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> rabbit_cfg['rabbit_userid'] = nova_oslo_messaging_data['username']<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> rabbit_cfg['rabbit_password'] = nova_oslo_messaging_data['password']<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.6pt"><span style="color:#1F497D">rabbit_cfg['rabbit_virtual_host'] = nova_oslo_messaging_data['virt_host']<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.6pt"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Zhipeng<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.6pt"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From:</b> Wensley, Barton [<a href="mailto:Barton.Wensley@windriver.com">mailto:Barton.Wensley@windriver.com</a>]
<br>
<b>Sent:</b> 2019<span lang="ZH-CN" style="font-family:"Microsoft YaHei",sans-serif;mso-fareast-language:ZH-CN">年</span>4<span lang="ZH-CN" style="font-family:"Microsoft YaHei",sans-serif;mso-fareast-language:ZH-CN">月</span>17<span lang="ZH-CN" style="font-family:"Microsoft YaHei",sans-serif;mso-fareast-language:ZH-CN">日</span>
20:24<br>
<b>To:</b> Liu, ZhipengS <<a href="mailto:zhipengs.liu@intel.com">zhipengs.liu@intel.com</a>>;
<a href="mailto:starlingx-discuss@lists.starlingx.io">starlingx-discuss@lists.starlingx.io</a><br>
<b>Subject:</b> RE: [Starlingx-discuss] Does rabbitmq listener work in NFV module<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Zhipeng,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Bart<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif"> Liu, ZhipengS [<a href="mailto:zhipengs.liu@intel.com">mailto:zhipengs.liu@intel.com</a>]
<br>
<b>Sent:</b> April 17, 2019 6:46 AM<br>
<b>To:</b> <a href="mailto:starlingx-discuss@lists.starlingx.io">starlingx-discuss@lists.starlingx.io</a><br>
<b>Subject:</b> [Starlingx-discuss] Does rabbitmq listener work in NFV module<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">From nfv-vim.log I see below<o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It seems NFV could not get notifications from nova now.<o:p></o:p></p>
<p class="MsoNormal">Have we enabled rabbitmq listener in NFV after containerized version?<o:p></o:p></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><span style="font-size:10.5pt"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><span style="font-size:10.5pt">Thanks!<o:p></o:p></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><span style="font-size:10.5pt">zhipeng<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>