Andy Zhou <[email protected]> wrote on 09/11/2015 10:50:25 PM: > > On Mon, Nov 9, 2015 at 11:04 AM, Liran Schour <[email protected]> wrote: > > Andy Zhou <[email protected]> wrote on 09/11/2015 07:49:37 PM: > >> > >> >> 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". > >> >> > >> > > >> > It can work if we can define "where" to be an array of <condition> and > >> > boolean values. For example: "where" : [false, <condition>*]. Since the > >> > monitor_cond will monitor any row that match at least one of the > >> > conditions, > >> > if we will have "where" : [false] no row will be monitored. > >> > >> This solution looks good to me. May be we can define <condition> as either > >> a 3-element array or a JSON boolean. For completeness, we can define > >> where : [] to be the same as where : [true] > >> > > > > OK, I will work on a combined patch series based on your monitor2 branch > > with the > > Bug fix. However it seems that I will not be able to make it till after the > > OVS > > conference. > That's fine. Are you going to OVS CON? if you do, we can also meet and > discuss more if you'd like. >
Yes I will be at the OVS CON. I will be glad to meet and discuss. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
