<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Thanks Vikas for your help, it’s clear and helpful to me.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Liping Mao</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Vikas Choudhary <<a href="mailto:choudharyvikas16@gmail.com">choudharyvikas16@gmail.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span>2016年5月27日 星期五 下午4:32<br>
<span style="font-weight:bold">To: </span>OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [openstack-dev] [Kuryr] Docker failed to add an existed network with GW interface already created<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hi Liping Mao,
<div><br>
</div>
<div>Please find my response inline. If still not clear or i am wrong somewhere please let me know.</div>
<div><br>
</div>
<div>Regards</div>
<div>Vikas<br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, May 27, 2016 at 10:37 AM, 毛立平 <span dir="ltr"><<a href="mailto:maoliping455@163.com" target="_blank">maoliping455@163.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">Hi Irena,<br>
<div><br>
Thanks for your comments.<br>
<br>
Currently, kuryr will create gw port with owner kuryr:container, but this GW can't work obviously.
<br>
</div>
</div>
</div>
</blockquote>
<div><font size="4" style="background-color:rgb(255,229,153)">In current code, as per my understanding, we are not creating gw port. If there are no pre-existing subnets and request for gw address is received, this
<a href="https://github.com/openstack/kuryr/blob/master/kuryr/controllers.py#L1118">
'if' condition</a> will not met and no gw port will be created.</font></div>
<div><font size="4" style="background-color:rgb(255,229,153)"><br>
</font></div>
<div><font size="4" style="background-color:rgb(255,229,153)">As the bug is saying, issue is there if there are pre-existing subnets and this
<a href="https://github.com/openstack/kuryr/blob/master/kuryr/controllers.py#L1118">
if condition</a> met. In this case it is creating a port for gw address which is not expected. </font></div>
<div><font size="4" style="background-color:rgb(255,229,153)">To fix this we can add logic for checking if it is gw address request (using "request_type") before this if condition and in case it is then verify if requested address is same as subnet gateway
address. If not same two choices:</font></div>
<div><font size="4" style="background-color:rgb(255,229,153)">1) Either return to the libnetwork this actual subnet gw in response. (Antoni suggestion)</font></div>
<div><font size="4" style="background-color:rgb(255,229,153)"> OR</font></div>
<div><font size="4" style="background-color:rgb(255,229,153)">2) Raise an exception as docker users request cannot be met.</font></div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
<div>it can be modified to create gw port with owner network:router_interface, but seems like CNM module
<br>
do not have action can be map with attach GW with vrouter.<br>
<br>
Do we have any reason why we need just create a neutron port but do not use it(attach to vrouter)?<br>
<br>
So I still think we can leave it in neutron router-interface-add / router-interface-delete .<br>
what do you think?<br>
</div>
<br>
<div>Regards,<br>
Liping Mao<br>
</div>
<div>
<div class="h5"><br>
<div style="zoom:1"></div>
<div></div>
<br>
At 2016-05-26 20:03:24, "Irena Berezovsky" <<a href="mailto:irenab.dev@gmail.com" target="_blank">irenab.dev@gmail.com</a>> wrote:<br>
<blockquote style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">
<div dir="ltr">Hi Liping Mao,
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, May 26, 2016 at 12:31 PM, Liping Mao (limao) <span dir="ltr">
<<a href="mailto:limao@cisco.com" target="_blank">limao@cisco.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Vikas, Antoni and Kuryr team,<br>
<br>
When I use kuryr, I notice kuryr will failed to add an existed<br>
network with gateway interface already created by neutron[1][2].<br>
<br>
The bug is because kuryr will create a neutron port for gw<br>
port in ipam_request_address.<br>
<br>
I think kuryr should not do actual create neutron gw port at all.<br>
Because CNM module do not have concept map with Neutron vRouter.<br>
Till now, user have to use neutron api to attach GW port in<br>
private network with vRouter. So I think the Kuryr should not<br>
actually create GW port.<br>
<br>
</blockquote>
<div>I think it possible to define via kuryr configuration file if kuryr should create or not gw port. Kuryr already does it for DHCP port.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What do you think? Thanks for any comments.<br>
<br>
<br>
[1] <a href="https://bugs.launchpad.net/kuryr/+bug/1584286" rel="noreferrer" target="_blank">
https://bugs.launchpad.net/kuryr/+bug/1584286</a><br>
[2] <a href="https://review.openstack.org/#/c/319524/4" rel="noreferrer" target="_blank">
https://review.openstack.org/#/c/319524/4</a><br>
<br>
<br>
<br>
Regards,<br>
Liping Mao<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
<br>
<br>
<span title="neteasefooter">
<p> </p>
</span><br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</span>
</body>
</html>