<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Aug 4, 2014, at 10:36 AM, Malawade, Abhijeet <<a href="mailto:Abhijeet.Malawade@nttdata.com">Abhijeet.Malawade@nttdata.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 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:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@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]-->
<div lang="EN-IN" link="blue" vlink="purple">
<div class="WordSection1"><p class="MsoNormal">Hi all,<o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">rpc module is not imported properly in nova, cinder, neutron projects. It is imported from wrong package.<o:p></o:p></p><p class="MsoNormal">In oslo-incubator 'rpc' module is used in openstack/common/service.py file and it is present at openstack/common package.<o:p></o:p></p><p class="MsoNormal">(<a href="https://github.com/openstack/oslo-incubator/blob/master/openstack/common/service.py%23L48">https://github.com/openstack/oslo-incubator/blob/master/openstack/common/service.py#L48</a>)<o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">But this 'rpc' module is present at base package in 'nova' and 'cinder' project while it is present at neutron/common/ package in neutron project.<o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">Nova : <a href="https://github.com/openstack/nova/blob/master/nova/rpc.py">
https://github.com/openstack/nova/blob/master/nova/rpc.py</a><o:p></o:p></p><p class="MsoNormal">Cinder : <a href="https://github.com/openstack/cinder/blob/master/cinder/rpc.py">
https://github.com/openstack/cinder/blob/master/cinder/rpc.py</a><o:p></o:p></p><p class="MsoNormal">Neutron : <a href="https://github.com/openstack/neutron/blob/master/neutron/common/rpc.py">
https://github.com/openstack/neutron/blob/master/neutron/common/rpc.py</a><o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">This openstack/common/service.py is synced form oslo-incubator in each project. Because of this if we make change in specific project then these changes will get removed after re-synced oslo-incubator code.<o:p></o:p></p><p class="MsoNormal">The same thing happened in nova project. This patch (<a href="https://review.openstack.org/%23/c/81833/">https://review.openstack.org/#/c/81833/</a>) has merged into nova code, but it is overwritten after syncing oslo-incubator code. There
is comment on this patch by 'Mark McLoughlin' regarding the same.<o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">I have filed bug for this issue in oslo : <a href="https://bugs.launchpad.net/oslo/+bug/1334661">
https://bugs.launchpad.net/oslo/+bug/1334661</a><o:p></o:p></p><p class="MsoNormal">And also I have pushed patch for same. But this patch will fail for 'Neutron' project.<o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">I think we have to try importing 'rpc' module from all possible places till it gets imported properly
<o:p></o:p></p><p class="MsoNormal">OR we need to change location of 'rpc' module in projects for uniformity. (ie to put 'rpc' module at some common place)<o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">Could you please give me your opinions on the same.</p></div></div></blockquote><div><br></div><div>As we move oslo modules out of the incubator and into libraries, we need to decouple them from the applications that are using them. In this case, we have a library trying to invoke a global method from an application module. Rather than having the library try to guess where that module or function is, we need to change the API of the service module in Oslo so that it takes an explicit argument for the thing it needs. For example, in this case ServiceLauncher should take an argument with a sequence of cleanup methods to be invoked on shutdown, and the application should pass rpc.cleanup in that list when it creates the ServiceLauncher.</div><div><br></div><div>Doug</div><br><blockquote type="cite"><div lang="EN-IN" link="blue" vlink="purple"><div class="WordSection1"><p class="MsoNormal"><o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">Thanks,<o:p></o:p></p><p class="MsoNormal">Abhijeet<o:p></o:p></p>
</div>
<br clear="both">
______________________________________________________________________<br>
Disclaimer:This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding<br>
</div>
_______________________________________________<br>OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br></blockquote></div><br></body></html>