<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
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-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Approach I am following is not cleaning blindly, there is utility in cleanup which I’ll use<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">To get eligible namespace candidates for cleanup (need to deep dive this logic how effective is that)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Then will extract id from namespace either using namespace manager or l3 agent code,
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">And call on l3 agent to cleanup respective namespaces.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">and to check cleanup, I am creating a router and setting just a gateway which create namespace,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">don’t add any interface, I see it cleans up qrouter-namespace but and I can still see router when I do router-list, which shouldn’t be there, people having knowledge
 on this pls correct me if I am wrong ? <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thanks and Regards !<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Manjeet Singh Bhatia<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><a name="_____replyseparator"></a><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Sergey Belous [mailto:sbelous@mirantis.com]
<br>
<b>Sent:</b> Tuesday, October 11, 2016 3:54 AM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions) <openstack-dev@lists.openstack.org><br>
<b>Subject:</b> Re: [openstack-dev] [neutron] proper cleanup of l3 resources (neutron-netns-cleanup)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi, Miguel.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">As I can see, Manjeet Singh Bhatia already proposed the change on review [1]—this patch adds the invoking a cleanup provided by l3-agent.<br>
Actually, I like the option 2. And I'm going to implement it and compare to Manjeet's solution.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">But can anybody suggest me, how can I manually reproduce the situation where netns-clean is needed to run for cleanup l3 namespaces? In which state should be these namespaces?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">[1] <a href="https://review.openstack.org/#/c/383936/">https://review.openstack.org/#/c/383936/</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 7 Oct 2016, at 15:38, Miguel Angel Ajo Pelayo <<a href="mailto:majopela@redhat.com">majopela@redhat.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi Sergey!,<br>
<br>
This was my point of view on a possible solution:<br>
<br>
<a href="https://bugs.launchpad.net/neutron/+bug/1403455/comments/12">https://bugs.launchpad.net/neutron/+bug/1403455/comments/12</a><br>
<br>
"""<br>
After much thinking (and quite little doing) I believe the option "2"<br>
I proposed is a rather reasonable one:<br>
<br>
2) Before cleaning a namespace blindly in the end, identify any<br>
network service in the namespace (via netstat), kill those processes,<br>
so they aren't orphaned, and then, kill the namespace.<br>
<br>
Any process should be safely killed that way, and if it's not, we can<br>
complicate our lifes and code with "1":<br>
1) Use stevedore HookManager to let out-of-tree repos register netns<br>
prefixes declaration, and netns cleaners,<br>
   so every piece of code (in-tree or out-of-tree) declare which<br>
netns prefixes they use, and provide a netns cleanup<br>
   hook to be called.<br>
<br>
"""<br>
<br>
Let me know what you think<br>
<br>
On Fri, Oct 7, 2016 at 2:15 PM, Sergey Belous <<a href="mailto:sbelous@mirantis.com">sbelous@mirantis.com</a>> wrote:<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello everyone.<br>
<br>
I’m very interesting in this one<br>
<a href="https://bugs.launchpad.net/neutron/+bug/1403455">https://bugs.launchpad.net/neutron/+bug/1403455</a><br>
Can anybody tell me, what is the current status of this bug? Is anybody<br>
working on it now?<br>
And as I can see, there are some options, that was discussed in comments to<br>
this bug and… did anybody decide which solution is the best?<br>
<br>
<br>
--<br>
Best Regards,<br>
Sergey Belous<br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:black">--<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">Best Regards,<br>
Sergey Belous<o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>