[openstack-dev] [quantum] Understanding DHCP Agent

Trinath Somanchi trinath.somanchi at gmail.com
Mon Oct 29 17:03:27 UTC 2012


Hi Mark-

Thanks a lot for the reply.....

-
Trinath

On Mon, Oct 29, 2012 at 7:24 PM, Mark McClain <mark.mcclain at dreamhost.com>wrote:

> You have the correct data flow for data requests initiated by the agent.
>
> mark
>
> On Oct 26, 2012, at 10:31 PM, Trinath Somanchi <trinath.somanchi at gmail.com>
> wrote:
>
> Hi-
>
> Please help me understand the data flow in the source code of the DHCP
> agent.
>
> 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,
>
> I found it to be using rpc cast and call. But was lost into the code to
> find the correct data flow.
>
> In my study I found this:
>
>
>
>
> quantum/agent/dhcp_agent.py     <--- the actual daemon agent, which makes
> the rpc.cast/rpc.call to fetch the data.
>
>           * A                  | *                 <------ (Flow
> representing arrows)
>           *  |                  V*
> quantum/db/dhcp_rpc_base.py     <---- which implements the QuantumPluginV2
> to process the rpc.cast/rpc.call by the above agent.
>
>             * A                |   *                <------ (Flow
> representing arrows)
>           *    |                V*
> quantum/db/db_base_plugin_v2.py    <--- where the actual DB processing
> happens for the requests.
>
>
>
>
> [1] Am I in a right path of understanding the dhcp agent daemon working.
>
> Kindly please help me understand the processes flow
>
> --
> Trinath
>
>
> On Fri, Oct 26, 2012 at 10:45 PM, Trinath Somanchi <
> trinath.somanchi at gmail.com> wrote:
>
>> Mark-
>>
>> First, thanks for the informative reply.
>>
>> True Said, I understood the flow. But then, I want to look into this
>> scenario by means of the Source Code.
>>
>> As described in the mail by me, I'm understanding How the Data flow
>> inside the code.
>>
>> Hence, I have put forward my understanding in the RPC call and cast of
>> the dhcp agent.
>>
>> as below.
>>
>> quantum/agent/dhcp_agent.py     <--- the actual daemon agent, which makes
>> the rpc.cast/rpc.call to fetch the data.
>>
>>           * A                  | *                 <------ (Flow
>> representing arrows)
>>           *  |                  V*
>> quantum/db/dhcp_rpc_base.py     <---- which implements the
>> QuantumPluginV2 to process the rpc.cast/rpc.call by the above agent.
>>
>>             * A                |   *                <------ (Flow
>> representing arrows)
>>           *    |                V*
>> quantum/db/db_base_plugin_v2.py    <--- where the actual DB processing
>> happens for the requests.
>>
>>
>> Here, (I'm new to the folsom code) i have outlined how the data flow
>> between the files is happening from my understanding.
>>
>> 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 ?
>>
>> Thanking you..
>>
>> -
>> Trinath
>>
>>
>> On Fri, Oct 26, 2012 at 9:07 PM, Mark McClain <mark.mcclain at dreamhost.com
>> > wrote:
>>
>>> Trinath-
>>>
>>> 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.
>>>
>>> In a cold start situation, the agent will:
>>>
>>> Make RPC call for active networks (the RPC flow is as your described
>>> below)
>>> Start any DHCP services for active networks
>>> Enter Notification Processing Loop
>>> - Wait for changes to Networks, Subnets, Ports
>>> - Modify DHCP daemon configs in response to those changes
>>>  (If notification payload does not have enough information use RPC to
>>> clarify current state)
>>>
>>> Does this clarify how the agent works?
>>>
>>> mark
>>>
>>> On Oct 26, 2012, at 11:10 AM, Trinath Somanchi <
>>> trinath.somanchi at gmail.com> wrote:
>>>
>>> Hi-
>>>
>>> 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,
>>>
>>> I found it to be using rpc cast and call. But was lost into the code to
>>> find the correct data flow.
>>>
>>> In my study I found this:
>>>
>>>
>>>
>>>
>>> quantum/agent/dhcp_agent.py     <--- the actual daemon agent, which
>>> makes the rpc.cast/rpc.call to fetch the data.
>>>
>>>           * A                  | *                 <------ (Flow
>>> representing arrows)
>>>           *  |                  V*
>>> quantum/db/dhcp_rpc_base.py     <---- which implements the
>>> QuantumPluginV2 to process the rpc.cast/rpc.call by the above agent.
>>>
>>>             * A                |   *                <------ (Flow
>>> representing arrows)
>>>           *    |                V*
>>> quantum/db/db_base_plugin_v2.py    <--- where the actual DB processing
>>> happens for the requests.
>>>
>>>
>>>
>>>
>>> I have some doubts here, (though there very preliminary)
>>>
>>> [1] The RPC cast and call are sent to the Quantum server ?
>>> [2] Am I in a right path of understanding the dhcp agent daemon working.
>>>
>>> Kindly please help me understand the processes flow
>>>
>>> Thanks in advance.
>>>
>>> --
>>> Regards,
>>> ----------------------------------------------
>>> Trinath Somanchi,
>>> +91 9866 235 130
>>>
>>> _______________________________________________
>>> OpenStack-dev mailing list
>>> OpenStack-dev at lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>>
>>>
>>> _______________________________________________
>>> OpenStack-dev mailing list
>>> OpenStack-dev at lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>>
>>
>>
>> --
>> Regards,
>> ----------------------------------------------
>> Trinath Somanchi,
>> +91 9866 235 130
>>
>>
>
>
> --
> Regards,
> ----------------------------------------------
> Trinath Somanchi,
> +91 9866 235 130
>
>  _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Regards,
----------------------------------------------
Trinath Somanchi,
+91 9866 235 130
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20121029/27d8d9ac/attachment-0001.html>


More information about the OpenStack-dev mailing list