diff mbox series

[ovs-dev,08/15] ovn-sbctl: Allow retries by default.

Message ID 20180101051640.13043-8-blp@ovn.org
State Accepted
Delegated to: Justin Pettit
Headers show
Series [ovs-dev,01/15] log: Add async commit support. | expand

Commit Message

Ben Pfaff Jan. 1, 2018, 5:16 a.m. UTC
Most of the OVS database-manipulation utilities (ovn-sbctl, ovn-nbctl,
ovs-vsctl, vtep-ctl) don't retry their connections by default because
they assume that the database is either up or down and likely to stay
that way.  The OVN southbound database, however, is a likely candidate
for high availability clustering, so that even if it appears to be
down for a moment it will be available again soon.  So, prepare for
the clustering implementation by enabling retry by default in
ovn-sbctl.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 ovn/utilities/ovn-sbctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Justin Pettit Jan. 13, 2018, 2:37 a.m. UTC | #1
> On Dec 31, 2017, at 9:16 PM, Ben Pfaff <blp@ovn.org> wrote:
> 
> Most of the OVS database-manipulation utilities (ovn-sbctl, ovn-nbctl,
> ovs-vsctl, vtep-ctl) don't retry their connections by default because
> they assume that the database is either up or down and likely to stay
> that way.  The OVN southbound database, however, is a likely candidate
> for high availability clustering, so that even if it appears to be
> down for a moment it will be available again soon.  So, prepare for
> the clustering implementation by enabling retry by default in
> ovn-sbctl.
> 
> Signed-off-by: Ben Pfaff <blp@ovn.org>

Exciting!

Acked-by: Justin Pettit <jpettit@ovn.org>

--Justin
diff mbox series

Patch

diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c
index 1c2e6843f23c..f16cefedd897 100644
--- a/ovn/utilities/ovn-sbctl.c
+++ b/ovn/utilities/ovn-sbctl.c
@@ -120,7 +120,7 @@  main(int argc, char *argv[])
     }
 
     /* Initialize IDL. */
-    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false, false);
+    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false, true);
     run_prerequisites(commands, n_commands, idl);
 
     /* Execute the commands.