Mark-<div><br></div><div>First, thanks for the informative reply.</div><div><br></div><div>True Said, I understood the flow. But then, I want to look into this scenario by means of the Source Code. </div><div><br></div><div>
As described in the mail by me, I'm understanding How the Data flow inside the code.</div><div><br></div><div>Hence, I have put forward my understanding in the RPC call and cast of the dhcp agent. </div><div><br></div>
<div>as below.</div><div><br></div><div><blockquote type="cite"><div class="h5"><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">quantum/agent/dhcp_agent.py     <--- the actual daemon agent, which makes the rpc.cast/rpc.call to fetch the data.</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">          <b> A                  | </b>                 <------ (Flow representing arrows)</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">          <b>  |                  V</b></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">quantum/db/dhcp_rpc_base.py     <---- which implements the QuantumPluginV2 to process the rpc.cast/rpc.call by the above agent.</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">            <b> A                |   </b>                <------ (Flow representing arrows)</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">          <b>    |                V</b></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">quantum/db/db_base_plugin_v2.py    <--- where the actual DB processing happens for the requests.     </div>
</div></blockquote><div><div class="h5"><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Here, (I'm new to the folsom code) i have outlined how the data flow between the files is happening from my understanding.</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Can you kindly please help me on the validity of my understanding. Were there any other files which help to achieve this in dhcp agent ?</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Thanking you..</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">-</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Trinath</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div></div></div><br><div class="gmail_quote">On Fri, Oct 26, 2012 at 9:07 PM, Mark McClain <span dir="ltr"><<a href="mailto:mark.mcclain@dreamhost.com" target="_blank">mark.mcclain@dreamhost.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="word-wrap:break-word">Trinath-<div><br></div><div>The DHCP agent uses both RPC and Notifications.  The general rule is that information originated by the Server flows via notifications and the agent uses RPC to request information from the Quantum server or notify the server of lease renewals. </div>
<div><br></div><div>In a cold start situation, the agent will:</div><div><br></div><div>Make RPC call for active networks (the RPC flow is as your described below)</div><div>Start any DHCP services for active networks</div>
<div>Enter Notification Processing Loop</div><div><span style="white-space:pre-wrap"> </span>- Wait for changes to Networks, Subnets, Ports</div><div><span style="white-space:pre-wrap">  </span>- Modify DHCP daemon configs in response to those changes</div>
<div><span style="white-space:pre-wrap">          </span>(If notification payload does not have enough information use RPC to clarify current state)</div><div><br></div><div>Does this clarify how the agent works?</div><div><br></div>
<div>mark</div><div><br></div><div><div><div><div class="h5"><div>On Oct 26, 2012, at 11:10 AM, Trinath Somanchi <<a href="mailto:trinath.somanchi@gmail.com" target="_blank">trinath.somanchi@gmail.com</a>> wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Hi-</span><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">I was trying to understand how the Quantum DHCP agent Daemon works.  As I walk through the code, to understand the working on the Daemon,</div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
I found it to be using rpc cast and call. But was lost into the code to find the correct data flow.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">In my study I found this:</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
quantum/agent/dhcp_agent.py     <--- the actual daemon agent, which makes the rpc.cast/rpc.call to fetch the data.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">          <b> A                  | </b>                 <------ (Flow representing arrows)</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

          <b>  |                  V</b></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">quantum/db/dhcp_rpc_base.py     <---- which implements the QuantumPluginV2 to process the rpc.cast/rpc.call by the above agent.</div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
            <b> A                |   </b>                <------ (Flow representing arrows)</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">          <b>    |                V</b></div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">quantum/db/db_base_plugin_v2.py    <--- where the actual DB processing happens for the requests.     </div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">   </div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">I have some doubts here, (though there very preliminary)</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">[1] The RPC cast and call are sent to the Quantum server ?</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

[2] Am I in a right path of understanding the dhcp agent daemon working.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

Kindly please help me understand the processes flow</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

Thanks in advance. </div><div><br></div>-- <br>Regards,<br>----------------------------------------------<br>Trinath Somanchi,<div><a href="tel:%2B91%209866%20235%20130" value="+919866235130" target="_blank">+91 9866 235 130</a></div>
<br></div></div>
_______________________________________________<br>OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">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><br>
</blockquote></div><br></div></div><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><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br>----------------------------------------------<br>Trinath Somanchi,<div>+91 9866 235 130</div><br>
</div>