[ovs-dev] [PATCH] Supporting ovn-northd service HA depend on OVNDB-HA

Ben Pfaff blp at ovn.org
Wed May 17 15:45:07 UTC 2017


From: Zhengwei Gao <multi_task at 163.com>

As ovn-northd servcie  parse network element between ovnnb_db and
ovnsb_db, it ensures ovn-northd service connecting to ovnnb_db and
ovnsb_db. OVNDB-HA was supported with pacemaker, ovn-northd service
will be failover fllowing OVNDB-HA.
---
This was posted as a github pull request:
https://github.com/openvswitch/ovs/pull/176

 ovn/utilities/ovndb-servers.ocf | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ovn/utilities/ovndb-servers.ocf b/ovn/utilities/ovndb-servers.ocf
index 908cb3c17d84..40c55411e828 100755
--- a/ovn/utilities/ovndb-servers.ocf
+++ b/ovn/utilities/ovndb-servers.ocf
@@ -122,8 +122,12 @@ ovsdb_server_notify() {
         # the right thing at startup
         ocf_log debug "ovndb_server: $host_name is the master"
         ${CRM_ATTR_REPL_INFO} -v "$host_name"
+        # Startup ovn-northd service
+        ${OVN_CTL} start_northd
 
     else
+        # Stop ovn-northd service
+        ${OVN_CTL} stop_northd
         # Synchronize with the new master
         ocf_log debug "ovndb_server: Connecting to the new master ${OCF_RESKEY_CRM_meta_notify_promote_uname}"
         ${OVN_CTL} demote_ovnnb --db-nb-sync-from-addr=${MASTER_IP} \
-- 
2.10.2



More information about the dev mailing list