[ovs-dev] [PATCH v1 ovn] ovn-nb/sbctl.c: Set no-leader-only as default for clustered dbs
blp at ovn.org
Thu Oct 3 13:03:15 UTC 2019
On Tue, Oct 01, 2019 at 05:05:28PM -0700, amginwal at gmail.com wrote:
> From: Aliasgar Ginwala <aginwala at ebay.com>
> When using ovn-nb/sbctl running in cluster, one can use local
> socket to run different commands. It is very inconvenient to pass
> no-leader-only in different tools using ovn-nb/sbctl instead of
> allowing one to to connect to any nodes in the cluster including
> e.g common usage ovn-nb/sbctl show.
> Hence, this commit handles the same.
> Signed-off-by: Aliasgar Ginwala <aginwala at ebay.com>
This change makes more of a difference than its size implies, because it
means that scripts that previously were guaranteed to get up-to-date
data can now get inconsistent results. It loses read-after-write
consistency, for example. I'd really prefer to avoid surprising users
with that kind of thing (especially as a change).
If it's common to want that kind of behavior, though, perhaps there
could be a nice way to set it as the default for a session. In daemon
mode, of course, it's already possible to control it for the daemon's
users. One option for outside daemon mode might be to introduce an
environment variable. The environment variable could be specific to
this feature, e.g. OVN_LEADER_ONLY=0 or OVN_LEADER_ONLY=1, or it could
be a general-purpose options variable,
e.g. OVN_OPTIONS=--no-leader-only. I don't know whether it should be
specific to one of ovn-sbctl and ovn-nbctl or apply to both.
Have you thought about these possibilities?
More information about the dev