On 04/22/2015 09:57 AM, Kyle Mestery wrote: > On Wed, Apr 22, 2015 at 8:28 AM, Russell Bryant <rbry...@redhat.com > <mailto:rbry...@redhat.com>> wrote: > > On 04/22/2015 09:21 AM, Salvatore Orlando wrote: > > Polling for port status is the easiest solution. > > In some cases excessive polling does not scale very well. > > For instance in large cloud with 1000s of compute nodes, this will put a > > bit of a strain on the neutron server. > > > > This why Aaron a while ago implemented [1] for interfacing neutron with > > nova. > > Basically in this way nova won't have to poll for neutron's port status > > - it will receive events for vif plugged and unplugged over a RESTful > > interface. > > I'm not sure if this is feasible or not, but perhaps you could think > > about listening for those events on your container manager. > > > > Salvatore > > > > [1] > http://git.openstack.org/cgit/openstack/neutron/tree/neutron/notifiers/nova.py > > I think it would be cool to be able to register your own port status > callback when you create a port. It would work similarly to the nova > notifier, but would call the custom callback instead of the nova API. > > We have a callback mechanism in Neutron now [1], Armando implemented it > late in Kilo [2]. I've copied him here as well to loop him in. It seems > reasonable that we could use this for what you want Russell. > > [1] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/callbacks > [2] > http://git.openstack.org/cgit/openstack/neutron/commit/?id=ad6a3ef5f6eb783fe9a8a2d907908ec3a8cece97
Cool stuff. It looks like it will help. To be clear though, what I think we need is an HTTP callback. Neutron needs to be able to notify an arbitrary system instead of specifically Nova that a port is ready. Another way to go about this would be to use Ceilometer. I think Ceilometer could collect port state change notifications off of the message bus and an arbitrary system could create alarms on port state changes. However, I think we'd rather avoid that dependency. There's actually a thread on openstack-dev discussing the more general problem here: http://lists.openstack.org/pipermail/openstack-dev/2015-April/060748.html There are many use cases where we need to be able to communicate information back to the API user (which would be the container manager in this case). We don't have a great common solution for it, really. Going back to the issue at hand, another option would be to just implement the same API call that Nova does for receiving the updates. You could then configure Neutron to point at that instead of a Nova install. http://git.openstack.org/cgit/openstack/neutron/tree/neutron/notifiers/nova.py -- Russell Bryant _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev