Message ID | 20200626194837.1375024-1-blp@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,ovn] ovn-northd: Make it harder to specify a bad database remote. | expand |
On Sat, Jun 27, 2020 at 1:19 AM Ben Pfaff <blp@ovn.org> wrote: > 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@ovn.org> > Acked-by: Numan Siddique <numans@ovn.org> Thanks Numan > --- > 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 > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > >
On Mon, Jun 29, 2020 at 12:38:02PM +0530, Numan Siddique wrote: > On Sat, Jun 27, 2020 at 1:19 AM Ben Pfaff <blp@ovn.org> wrote: > > > 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@ovn.org> > > > > Acked-by: Numan Siddique <numans@ovn.org> Thanks, applied to master.
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(); }
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@ovn.org> --- northd/ovn-northd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)