On Tue, Mar 31, 2015 at 05:00:44PM -0700, Ben Pfaff wrote: > On Tue, Mar 31, 2015 at 04:03:04PM -0400, Russell Bryant wrote: > > Signed-off-by: Russell Bryant <rbry...@redhat.com> > > --- > > > > This is very early, but I wanted to get feedback on the general approach > > used to > > detect changes in the ovn and ovn-nb dbs. Does using the IDLs and seqno > > seem > > like a sane approach? > > > > I don't see an easy way to tell anything about what the changes were. The > > TODO > > document mentions that implementing a brute force translation of the entire > > ovn-nb DB when a change happens may be the easiest first step and this > > approach > > seems to support that. More intelligent approaches will probably require > > context about the changes as they occur. Is that (or anything else) a > > reason I > > should be using some another approach for detecting db changes? > > This is fine to start. The IDL doesn't currently provide a way to > find out what the changes are, for a couple of reasons. First, it > hasn't been necessary in the existing use cases. Second, I'm not sure > yet what is the best (most convenient) form for the change > notifications. Anyway, I think we should start with the simplest > possible approach, then make it more sophisticated as scale warrants.
I decided that this skeleton was an OK place to start, so I applied it to the branch. I folded in the following change to keep it from segfaulting on startup. (I guess that the default databases probably shouldn't be the same but the same is still better than NULL ;-) diff --git a/ovn/ovn-nbd.c b/ovn/ovn-nbd.c index 303fcc2..d13fe81 100644 --- a/ovn/ovn-nbd.c +++ b/ovn/ovn-nbd.c @@ -140,7 +140,7 @@ parse_options(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) } if (!ovnnb_db) { - ovn_db = default_db(); + ovnnb_db = default_db(); } free(short_options); _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev