diff mbox

[ovs-dev] 回复:Re: [PATCH] Supporting ovn-northd service HA depend on OVNDB-HA

Message ID 5e9de8ff.1b77.15c1e66b9c6.Coremail.multi_task@163.com
State Not Applicable
Headers show

Commit Message

高正伟 May 19, 2017, 1:51 a.m. UTC
Thanks Numan


I think that supporting  OVNDB and ovn-northd HA  depend on one pacemaker is an idea,   In case of thinking OVN-HA,  user will not individually care about OVNDB or ovn-northd HA.


Thanks.



在 2017-05-18 20:53:22,"Numan Siddique" <nusiddiq@redhat.com> 写道:





On Wed, May 17, 2017 at 9:15 PM, Ben Pfaff <blp@ovn.org> wrote:
From: Zhengwei Gao <multi_task@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(+)




I tried this patch and it works.
In the case of OpenStack and Tripleo, puppet is used to create and manage the pacemaker resources for OVN [1] and it also starts ovn-northd as a pacemaker service with colocation constraint set to the virtual ip created for the OVN DB servers.


I think it makes more sense to start ovn-northd based on a flag (like START_NORTHD) so that the user or the configuration systems can chose.


Thanks
Numan






[1] - https://review.openstack.org/#/c/372274/10/manifests/profile/pacemaker/ovn_northd.pp
 
--
2.10.2
diff mbox

Patch

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} \