<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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 class="Apple-tab-span" style="white-space:pre">    </span>- Wait for changes to Networks, Subnets, Ports</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>- Modify DHCP daemon configs in response to those changes</div><div><span class="Apple-tab-span" style="white-space:pre">               </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>On Oct 26, 2012, at 11:10 AM, Trinath Somanchi <<a href="mailto:trinath.somanchi@gmail.com">trinath.somanchi@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Hi-</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">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-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
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-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">In my study I found this:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
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-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">          <b> A                  | </b>                 <------ (Flow representing arrows)</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
          <b>  |                  V</b></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">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-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
            <b> A                |   </b>                <------ (Flow representing arrows)</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">          <b>    |                V</b></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">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-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">   </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I have some doubts here, (though there very preliminary)</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">[1] The RPC cast and call are sent to the Quantum server ?</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
[2] Am I in a right path of understanding the dhcp agent daemon working.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Kindly please help me understand the processes flow</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Thanks in advance. </div><div><br></div>-- <br>Regards,<br>----------------------------------------------<br>Trinath Somanchi,<div>+91 9866 235 130</div><br>
_______________________________________________<br>OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br></blockquote></div><br></div></body></html>