<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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@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: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-family:"Calibri","sans-serif";}
@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">Vinay, good summary of the options and their pros-cons!<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">The simple solution does not waste IP addresses, same we have 2 servers and the first exhausts its address pool, then the second server is the only one with
 addresses left, we it will get used.  A negative is that if one of the servers were to go down, we have lost access to half the address space .. but if and when the server comes back, all shall be good. In the meantime, guess we would need to monitor the dhcp
 agents along with all other services/servers to see if they are alive.<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">- Split scope DHCP (two or more servers split the IP address and there is no overlap)<o:p></o:p></p>
<p class="MsoNormal">  pros: simple<o:p></o:p></p>
<p class="MsoNormal">  cons: wastes IP addresses,<o:p></o:p></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"><o:p> </o:p></span></p>
<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""> Vinay Bannai [mailto:vbannai@gmail.com]
<br>
<b>Sent:</b> Friday, November 30, 2012 3:49 PM<br>
<b>To:</b> OpenStack Development Mailing List<br>
<b>Subject:</b> Re: [openstack-dev] [Quantum] continuing todays discussion about the l3 agents<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Gary and Mark,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">You brought up the issue of scaling horizontally and vertically in your earlier email. In the case of horizontal scaling, I would agree that it would have to be based on the "scheduler" approach proposed by Gong and Nachi. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">On the issue of vertical scaling (I am using the DHCP redundancy as an example), I think it would be good to base our discussions on the various methods that have been discussed and do pro/con analysis in terms of scale, performance and
 other such metrics. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">- Split scope DHCP (two or more servers split the IP address and there is no overlap)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  pros: simple<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  cons: wastes IP addresses,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">- Active/Standby model (might have run VRRP or hearbeats to dictate who is active)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  pros: load evenly shared<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  cons: needs shared knowledge of address assignments, <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">            need hearbeats or VRRP to keep track of failovers<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">- LB method (use load balancer to fan out to multiple dhcp servers)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  pros: scales very well <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  cons: the lb becomes the single point of failure,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">           the lease assignments needs to be shared between the dhcp servers<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I see that the DHCP agent and the quantum server communicate using RPC. Is the plan to leave it alone or migrate it towards something like AMQP based server in the future when the "scheduler" stuff is implemented. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Vinay<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">On Wed, Nov 28, 2012 at 8:03 AM, Mark McClain <<a href="mailto:mark.mcclain@dreamhost.com" target="_blank">mark.mcclain@dreamhost.com</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
On Nov 28, 2012, at 8:03 AM, gong yong sheng <<a href="mailto:gongysh@linux.vnet.ibm.com">gongysh@linux.vnet.ibm.com</a>> wrote:<br>
<br>
> On 11/28/2012 08:11 AM, Mark McClain wrote:<br>
>> On Nov 27, 2012, at 6:33 PM, gong yong sheng <<a href="mailto:gongysh@linux.vnet.ibm.com">gongysh@linux.vnet.ibm.com</a>> wrote:<br>
>><br>
>> Just wanted to clarify two items:<br>
>><br>
>>>> At the moment all of the dhcp agents receive all of the updates. I do not see why we need the quantum service to indicate which agent runs where. This will change the manner in which the dhcp agents work.<br>
>>> No. currently, we can run only one dhcp agent  since we are using a topic queue for notification.<br>
>> You are correct.  There is a bug in the underlying Oslo RPC implementation that sets the topic and queue names to be same value.  I didn't get a clear explanation of this problem until today and will have to figure out a fix to oslo.<br>
>><br>
>>> And one problem with multiple agents serving the same ip is:<br>
>>> we will have more than one agents want to update the ip's leasetime now and than.<br>
>> This is not a problem.  The DHCP protocol was designed for multiple servers on a network.  When a client accepts a lease, the server that offered the accepted lease will be the only process attempting to update the lease for that port.  The other DHCP instances
 will not do anything, so there won't be any chance for a conflict.  Also, when a client renews it sends a unicast message to that previous DHCP server and so there will only be one writer in this scenario too.  Additionally, we don't have to worry about conflicting
 assignments because the dhcp agents use the same static allocations from the Quantum database.<br>
> I mean dhcp agent is trying to update leasetime to quantum server. If we have more than one dhcp agents, this will cause confusion.<br>
>    def update_lease(self, network_id, ip_address, time_remaining):<br>
>        try:<br>
>            self.plugin_rpc.update_lease_expiration(network_id, ip_address,<br>
>                                                    time_remaining)<br>
>        except:<br>
>            self.needs_resync = True<br>
>            LOG.exception(_('Unable to update lease'))<br>
> I think it is our dhcp agent's defect. Why does our dhcp agent need the lease time? all the IPs are managed in our quantum server, there is not need for dynamic ip management in dhcp server managed by dhcp agent.<o:p></o:p></p>
</div>
<p class="MsoNormal">There cannot be confusion.  The dhcp client selects only one server to accept a lease, so only one agent will update this field at a time. (See RFC2131 section 4.3.2 for protocol specifics).  The dnsmasq allocation database is static in
 Quantum's setup, so the lease renewal needs to propagate to the Quantum Server.  The Quantum server then uses the lease time to avoid allocating IP addresses before the lease has expired.  In Quantum, we add an additional restriction that expired allocations
 are not reclaimed until the associated port has been deleted as well.<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
mark<br>
<br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">-- <br>
Vinay Bannai<br>
Email: <a href="mailto:vbannai@gmail.com">vbannai@gmail.com</a><br>
Google Voice: 415 938 7576<o:p></o:p></p>
</div>
</body>
</html>