diff mbox

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

Message ID 20170517154507.31840-1-blp@ovn.org
State Not Applicable
Headers show

Commit Message

Ben Pfaff May 17, 2017, 3:45 p.m. UTC
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(+)

Comments

Numan Siddique May 18, 2017, 12:53 p.m. UTC | #1
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(+)
>
> 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} \
>

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
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
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} \