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