[ovs-dev] [PATCH v2 1/2] Add dry-run option to ovs-dpctl and ovs-ofctl commands.

Ben Pfaff blp at ovn.org
Sun Aug 14 05:36:31 UTC 2016


On Thu, Aug 04, 2016 at 05:55:34PM +0000, Ryan Moats wrote:
> ovs-dpctl and ovs-ofctl lack a dry-run option.  Add it
> and the necessary scaffolding to each.
> 
> Signed-off-by: Ryan Moats <rmoats at us.ibm.com>

The point behind a --dry-run option is supposed to be that it does
everything up to but not actually including modifying state.  For
example, in ovs-vsctl it actually connects to the database and does the
whole operation up to the point where it sends the transaction to the
remote database, at which point it just doesn't do it.  This is valuable
for the user because it means that all of the syntax gets checked and
most of the semantics (e.g. "ovs-vsctl --dry-run del-br br0" will check
that a bridge br0 exists).

As implemented by this patch, though, --dry-run does nothing at all
beyond verifying that there is a plausible number of parameters to a
command that might modify state.  Then it exits silently and
successfully, giving the user the impression that something happened.

So, I think that such an option should be named something different, say
--read-only, and should cause the utility to exit with an error message.

I think that's a pretty simple change to the series so perhaps we can
still get this in on Monday?



More information about the dev mailing list