[ovs-dev] [PATCH v2] ovn-nb/sbctl: add inactivity probe in ovn-nb/sbctl set-connection

Guoshuai Li ligs at dtdream.com
Mon Mar 12 06:42:38 UTC 2018


> On Thu, Mar 08, 2018 at 07:24:47PM +0800, Guoshuai Li wrote:
>> From: Dong Jun <dongj at dtdream.com>
>>
>> This patch can set inactivity probe for connection by command
>> ovn-nbctl set-connection inactivity_probe=30000 ptcp:6641:0.0.0.0
>> ovn-sbctl set-connection inactivity_probe=30000 ptcp:6642:0.0.0.0
>>
>> Signed-off-by: Guoshuai Li <ligs at dtdream.com>
> Thanks for v2.  Here are some suggestions for folding in on the next
> version.
>
> I have some additional thoughts here.  I am probably thinking about it
> all too hard.
>
> First, ovn-nbctl (etc.) has a syntax for options that would ordinarily
> be used, e.g.:
>          ovn-nbctl --inactivity-probe=MSECS set-connection TARGET...
>
> The possible disadvantage of that is that it could not be used to set a
> different inactivity probe value for different targets.  However, I
> don't know whether that is actually a valuable use case.  If it is
> valuable, though, there is the problem that cmd_get_connection()
> currently won't show the inactivity probes in an order that could be fed
> directly back to set-connection, since it might put the ones with the
> defaults after the ones that are non-default.  However, I'm not sure
> that get-connection showing the inactivity probes is actually valuable
> at all!
>
> Anyway, I'd be inclined to use --inactivity-probe as an option, have it
> apply to all connections, and then make get-connection not print the
> inactivity probes at all (which matches what "ovs-vsctl get-controller"
> does, and I don't recall anyone ever complaining about that before).
>
> What do you think?
>
> Thanks,
>
> Ben.

Hello Ben,
I agree with you, it looks like there are four commands needed 
--inactivity-probe:
ovn-nbctl set-connection
ovn-sbctl set-connection
vtep-ctl set-manager
ovs-vsctl set-manager
I am ready to try it.

There I have a little doubt:
For example --time --db applies to all commands, but --inactivity-probe 
only applies to set-connection(set-manager).
Can other commands ignore it when it is carried by the user?  This may 
be easier to implement.





More information about the dev mailing list