<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=us-ascii">
<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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
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-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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi Matt,<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">Thank you for the comments and advice.<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’ll give it a try on the reproduction and keep you synced with the status.<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">BR,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Kailun<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="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>From:</b> Peters, Matt [mailto:Matt.Peters@windriver.com]
<br>
<b>Sent:</b> Friday, October 19, 2018 3:17 AM<br>
<b>To:</b> Qin, Kailun <kailun.qin@intel.com>; Legacy, Allain <Allain.Legacy@windriver.com><br>
<b>Cc:</b> starlingx-discuss@lists.starlingx.io<br>
<b>Subject:</b> RE: Question about patch upstreaming for a38f899<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Hi Kailun,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Looking at the remaining items that you had in the attachment,  I agree with your assessment of the changes.<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 don’t have any further information on how to reproduce the first item, other than to run the tempest tests in a multi-core environment repeatedly to try and trigger the race condition.  However, since the tests
 may have changed from the time of the original commit, it may be that this scenario can no longer be triggered.<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">-Matt<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></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 #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<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"> Peters, Matt [<a href="mailto:Matt.Peters@windriver.com">mailto:Matt.Peters@windriver.com</a>]
<br>
<b>Sent:</b> Monday, October 15, 2018 1:05 PM<br>
<b>To:</b> Qin, Kailun; Legacy, Allain<br>
<b>Cc:</b> <a href="mailto:starlingx-discuss@lists.starlingx.io">starlingx-discuss@lists.starlingx.io</a><br>
<b>Subject:</b> Re: [Starlingx-discuss] Question about patch upstreaming for a38f899<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Based on the original commit message (see below), it would fall into scenario #2.  However, as the commit message indicates, this is based on race conditions when running tempest, therefore it may not be easily
 reproducible.<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">    CGTS-3885: dhcp: handle concurrent port creation errors<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">    Running tempest nose tests exposes a race condition between the server<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">    deleting a subnet and an agent creating a DHCP port.  This problem manifests<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">    itself in different ways depending on the whether the error is returned to the<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">    subnet delete operation or the DHCP port creation.<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">    This Jira (3885) addresses how the error is handled by the agent when the<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">    subnet is concurrently deleted at the server.  The changes to address the error<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">    that is returned to the API client are in CGTS-3432.<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">    Because of how the server and agents are designed there is a lack of<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">    determinism in how this particular issue manifests itself.  The variants<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">    manifest themselves based on when the subnet is deleted in relation to when the<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">    port is created.<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">      1) if the port is returned with no fixed IP address then this results in the<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      agent failing to setup the default route in the namespace because there is no<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      local IP address to use to contact the gateway IP address.<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">      2) if the port is updated after creation to no longer have an IP address then<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      'reload_allocations' action is invoked instead of the 'disabled' action.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      This leads to a failure to reenable because the subnet no longer exits.<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">      3) if doing a 'disable' action it is possible that previous 'restart',<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      'enable', or 'reload' actions did not get far enough to create the<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      namespace.  For this reason we should not throw an error if the namespace<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      does not exist.<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">      4) if attempting a 'reload_allocations' we should fail the request if the<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      namespace does not exist.<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">      5) if attempting a 'reload_allocations' with retain_port=True we should not<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      delete the configuration files because the vswitch port name is stored in the<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      'interface' file.  If an error occurs during the enable action we will not be<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      able to 'unplug' the port from the vswitch because we will not know which<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">      name to use during the 'unplug'.  This will leak ports in the vswitch.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></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 #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<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"> Qin, Kailun [<a href="mailto:kailun.qin@intel.com">mailto:kailun.qin@intel.com</a>]
<br>
<b>Sent:</b> Monday, October 15, 2018 5:00 AM<br>
<b>To:</b> Peters, Matt; Legacy, Allain<br>
<b>Cc:</b> <a href="mailto:starlingx-discuss@lists.starlingx.io">starlingx-discuss@lists.starlingx.io</a><br>
<b>Subject:</b> Question about patch upstreaming for a38f899<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Matt, Allain,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am analyzing the patch a38f899 for upstreaming. It seems to me that parts of the patch have already been addressed by upstream, while some of the rest may need your double confirm/clarification.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Please kindly check the attached analysis report for further details.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Let me know if any question. Thanks a lot!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">BR,<o:p></o:p></p>
<p class="MsoNormal">Kailun<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>