[ovs-dev] [PATCH ovn] ovn-northd: Make it harder to specify a bad database remote.

Ben Pfaff blp at ovn.org
Fri Jun 26 19:48:37 UTC 2020


Without this change, --ovnnb-db='' produces bad results, such as an
assertion failure.  With it, ovn-northd uses the default database.  The
latter seems preferable.  Similarly for --ovnsb-db=''.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 northd/ovn-northd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 784f33b6861c..d586c12eabb0 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -11697,11 +11697,11 @@ parse_options(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
         }
     }
 
-    if (!ovnsb_db) {
+    if (!ovnsb_db || !ovnsb_db[0]) {
         ovnsb_db = default_sb_db();
     }
 
-    if (!ovnnb_db) {
+    if (!ovnnb_db || !ovnnb_db[0]) {
         ovnnb_db = default_nb_db();
     }
 
-- 
2.26.2



More information about the dev mailing list