On Wed, Nov 4, 2015 at 5:22 AM, Liran Schour <[email protected]> wrote:
> In order not to have 2 new monitor methods, maybe we should combine them
> into a single method.
>
> However, as I thought on this, monitor_cond without any conditions should
> not send any updates at all. A typical usage will be in OVN when
> ovn-controller will open a monitor_cond session with empty "where" condition
> array and when VMs are deployed on this host, it will add conditions by
> monitor_cond_change method and by that will get all the updates relevant to
> that specific host.
>
> As I see it, we have here 2 options:
> 1. monitor_cond without any "where" value will behave as the proposed
> monitor2 method - send updates upon all rows using update2 notifications.
>     monitor_cond with "where" value that is an empty array will not send any
> updates at all till conditions are added by monitor_cond_change method.
>
This can work, but the API seems subtle. So I'd prefer to explore the
next option more.

> 2. monitor_cond always sends updates. If there is no "where" value or it is
> an empty array, updates on all rows will be sent using update2
> notifications. In this case a client will not be able to open a monitor
> session and expect no updates at all like written in the usage above.
>

This seems natural.

If no updates are expected at the beginning, could we come up with a
where condition that
will not generate any updates? Like "where false".
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to