diff mbox series

[ovs-dev,branch-2.12,2/2] ovn-controller.c: Move the position of handling OVN-SB related settings.

Message ID 1579729679-37362-2-git-send-email-hzhou@ovn.org
State New
Headers show
Series [ovs-dev,branch-2.12,1/2] ovn-controller.c: Fix possible NULL pointer dereference. | expand

Commit Message

Han Zhou Jan. 22, 2020, 9:47 p.m. UTC
Move the logic of handling OVN-SB related setting in external-ids
after the ovs_idl_loop run, so that any change in the external-ids
settings can take effect in the same iteration, without waiting for
the next one.

Reported-by: Lars Kellogg-Stedman <lars@redhat.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2020-January/049695.html
Tested-by: Flavio Fernandes <flavio@flaviof.com>
Acked-by: Numan Siddique <numans@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Han Zhou <hzhou@ovn.org>
---
 ovn/controller/ovn-controller.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Ben Pfaff Jan. 23, 2020, 8:28 p.m. UTC | #1
Thank you for the backports.  I applied these to branch-2.12.
diff mbox series

Patch

diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c
index eb885fc..4f5d72b 100644
--- a/ovn/controller/ovn-controller.c
+++ b/ovn/controller/ovn-controller.c
@@ -1904,9 +1904,6 @@  main(int argc, char *argv[])
     exiting = false;
     restart = false;
     while (!exiting) {
-        update_sb_db(ovs_idl_loop.idl, ovnsb_idl_loop.idl);
-        update_ssl_config(ovsrec_ssl_table_get(ovs_idl_loop.idl));
-        ofctrl_set_probe_interval(get_ofctrl_probe_interval(ovs_idl_loop.idl));
         old_engine_run_id = engine_run_id;
 
         struct ovsdb_idl_txn *ovs_idl_txn = ovsdb_idl_loop_run(&ovs_idl_loop);
@@ -1920,6 +1917,10 @@  main(int argc, char *argv[])
             ovs_cond_seqno = new_ovs_cond_seqno;
         }
 
+        update_sb_db(ovs_idl_loop.idl, ovnsb_idl_loop.idl);
+        update_ssl_config(ovsrec_ssl_table_get(ovs_idl_loop.idl));
+        ofctrl_set_probe_interval(get_ofctrl_probe_interval(ovs_idl_loop.idl));
+
         struct ovsdb_idl_txn *ovnsb_idl_txn
             = ovsdb_idl_loop_run(&ovnsb_idl_loop);
         unsigned int new_ovnsb_cond_seqno