[openstack-dev] [neutron][oslo]neutron agent not receiving callback

Vikash Kumar vikash.kumar at oneconvergence.com
Wed Mar 9 17:18:33 UTC 2016


Thanks,

     Yeah I just gone over doc. and tried to use the subscription. After
looking into code I understood thats its not for interprocess.

@Armando - Thanks for updating faq

On Wed, Mar 9, 2016 at 10:40 PM, Armando M. <armamig at gmail.com> wrote:

>
>
> On 9 March 2016 at 09:14, Assaf Muller <assaf at redhat.com> wrote:
>
>> On Wed, Mar 9, 2016 at 9:40 AM, Ihar Hrachyshka <ihrachys at redhat.com>
>> wrote:
>> > Vikash Kumar <vikash.kumar at oneconvergence.com> wrote:
>> >
>> >>
>> >>
>> >> On Wed, Mar 9, 2016 at 3:42 PM, Vikash Kumar
>> >> <vikash.kumar at oneconvergence.com> wrote:
>> >> I have written a sample neutron agent which subscribe for the
>> AFTER_CREATE
>> >> event of router. I have defined a sample method as callback, but the
>> method
>> >> doesn't gets called anytime.
>> >>
>> >> Also, in logs:
>> >>
>> >> 2016-03-09 01:36:08.220 7075 DEBUG neutron.callbacks.manager [-]
>> >> Subscribe: <function add_router at 0x7fdbbc482ed8> router after_create
>> >> subscribe /opt/stack/neutron/neutron/callbacks/manager.py:41
>> >>
>> >>
>> >>     which means the subscription is successful.
>> >>
>> >>    Do I need to enable anything in config file to get that ? Or am I
>> >> missing something ?
>> >
>> >
>> > First, nothing oslo specific is discussed here, so [oslo] tag is
>> probably
>> > redundant.
>> >
>> > Overall, I believe you try to rely on wrong thing that won’t deliver for
>> > you: callbacks are internal to neutron-server, so events triggered by
>> > neutron-servers will never reach any other processes (like your agent).
>>
>> The same callbacks mechanism is also used in the L3 agent, but as Ihar
>> said, events in one process (neutron-server) will not trigger
>> callbacks in another process (l3-agent). If that's what you want,
>> you'll need RPC.
>>
>
> Callbacks is a general pub/sub local communication mechanism, whether it
> applies to neutron-server or an agent. Clarifying here:
>
> https://review.openstack.org/#/c/290700/
>
>
>>
>> >
>> > More info:
>> http://docs.openstack.org/developer/neutron/devref/callbacks.html
>> >
>> > Ihar
>> >
>> >
>> __________________________________________________________________________
>> > OpenStack Development Mailing List (not for usage questions)
>> > Unsubscribe:
>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Regards,
Vikash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160309/19aba2b8/attachment.html>


More information about the OpenStack-dev mailing list