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 <[email protected]>
---
 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

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to