From: Numan Siddique <[email protected]> There are occasional crashes seen with OpenShift CI
**** gdb) bt ***** This patch fixes it. Reported-by: Alexander Constantinescu <[email protected]> Signed-off-by: Numan Siddique <[email protected]> --- controller/ovn-controller.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index 4d245ca28..386c9f006 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -436,9 +436,10 @@ static int get_ofctrl_probe_interval(struct ovsdb_idl *ovs_idl) { const struct ovsrec_open_vswitch *cfg = ovsrec_open_vswitch_first(ovs_idl); - return smap_get_int(&cfg->external_ids, - "ovn-openflow-probe-interval", - OFCTRL_DEFAULT_PROBE_INTERVAL_SEC); + return !cfg ? OFCTRL_DEFAULT_PROBE_INTERVAL_SEC : + smap_get_int(&cfg->external_ids, + "ovn-openflow-probe-interval", + OFCTRL_DEFAULT_PROBE_INTERVAL_SEC); } /* Retrieves the pointer to the OVN Southbound database from 'ovs_idl' and -- 2.24.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
