On Thu, Nov 29, 2012 at 06:01:09PM +0100, Thomas Graf wrote:
> On 11/29/2012 05:53 PM, Ben Pfaff wrote:
> >This is different from the approach that we discussed earlier in the
> >"ovs-vsctl: check if the device name is valid" thread in late October
> >and early November.  Here's what I wrote at the time:
> >
> >>Stepping back: I support your basic proposal, that "ovs-vsctl
> >>add-port" should report a problem if the port cannot successfully be
> >>added.  The issue is that, so far, the approaches I've seen don't fit
> >>well with the overall Open vSwitch design.  Here is another approach
> >>that fits better: make "ovs-vsctl add-port" check the value that
> >>ovs-vswitchd assigns to the "ofport" column in the new Interface
> >>record.  When a port is added successfully, this column receives a
> >>positive integer value; when adding a port fails, it receives the
> >>value -1.  I'd accept a patch to do this.
> >
> >I still think that's a good approach, probably better than the approach
> >in this series of patches.  What's the reason for this change of
> >approach?
> 
> The posted patch series resolves the problem of lack of feedback in
> a much more generic way that works for all commands that change the
> database. I don't see why I should be putting a add-port specific check
> into ovs-vsctl when I can resolve the problem on a much higher level.
> 
> You say your original idea is "probably better". Can you be specific?
> What is better about it?

It's better in that it would simply report whether the port was
successfully added in an unambiguous fashion, instead of shipping
possibly a lot of possibly irrelevant log data to the user, often
regardless of whether the port was added successfully or not.  Your own
example shows this.

Also, the database is designed to maintain state.  This patch series
instead tries to use it in a request/reply manner.  That works OK with a
single client but it's going to fall down whenever there's more than one
client making requests in parallel.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to