[ovs-dev] [PATCH v3 1/4] ovn: ovn-ctl support for HA ovn DB servers

Babu Shanmugam bschanmu at redhat.com
Fri Oct 14 23:53:46 UTC 2016



On Saturday 15 October 2016 02:25 AM, Andy Zhou wrote:
>
>
> On Fri, Oct 14, 2016 at 2:52 AM, Babu Shanmugam <bschanmu at redhat.com 
> <mailto:bschanmu at redhat.com>> wrote:
>
>
>
>     On Friday 14 October 2016 04:00 AM, Andy Zhou wrote:
>>
>>
>>     Done. Now it shows the following.
>>
>>         [root at h2 ovs]# crm configure show
>>
>>         node1: h1 \
>>
>>         attributes
>>
>>         node2: h2
>>
>>         primitiveClusterIP IPaddr2 \
>>
>>         paramsip=10.33.75.200cidr_netmask=32\
>>
>>         opstart interval=0stimeout=20s\
>>
>>         opstop interval=0stimeout=20s\
>>
>>         opmonitor interval=30s
>>
>>         primitiveovndb ocf:ovn:ovndb-servers \
>>
>>         opstart interval=0stimeout=30s\
>>
>>         opstop interval=0stimeout=20s\
>>
>>         oppromote interval=0stimeout=50s\
>>
>>         opdemote interval=0stimeout=50s\
>>
>>         opmonitor interval=1min\
>>
>>         meta
>>
>>         msovndb-master ovndb\
>>
>>         metanotify=true
>>
>>         colocationcolocation-ovndb-master-ClusterIP-INFINITY inf:
>>         ovndb-master:Started ClusterIP:Master
>>
>>         orderorder-ClusterIP-ovndb-master-mandatory inf:
>>         ClusterIP:start ovndb-master:start
>>
>>         propertycib-bootstrap-options: \
>>
>>         have-watchdog=false\
>>
>>         dc-version=1.1.13-10.el7_2.4-44eb2dd\
>>
>>         cluster-infrastructure=corosync\
>>
>>         cluster-name=mycluster\
>>
>>         stonith-enabled=false
>>
>>         propertyovn_ovsdb_master_server: \
>>
>>
>>
>>
>>     My installation does not have ocf-tester,  There is a program
>>     called ocft with a test option. Not sure if this is a suitable
>>     replacement. If not, how could I get
>>     the ocf-tester program? I ran the ocft program and get the
>>     following output. Not sure what it means.
>>
>>      [root at h2 ovs]# ocft test -n test-ovndb -o master_ip 10.0.0.1
>>     /usr/share/openvswitch/scripts/ovndb-servers.ocf
>>
>>     ERROR: cases directory not found.
>>
>>
>
>     I have attached ocf-tester with this mail. I guess it's a
>     standalone script. If it does not work, I think it's better not to
>     attempt anymore as we have another way to find out.
>
>>
>>
>>         Alternately, you can check if the ovsdb servers are started
>>         properly by running
>>
>>         /usr/share/openvswitch/scripts/ovn-ctl
>>         --db-sb-sync-from=10.0.0.1 --db-nb-sync-from=10.0.0.1 start_ovsdb
>>
>>
>>     The output are as follows. Should we use --db-sb-sync-from-addr
>>     instead?
>>      [root at h2 ovs]# /usr/share/openvswitch/scripts/ovn-ctl
>>     --db-sb-sync-from=10.0.0.1 --db-nb-sync-from=10.0.0.1 start_ovsdb
>>
>>     /usr/share/openvswitch/scripts/ovn-ctl: unknown option
>>     "--db-sb-sync-from=10.0.0.1" (use --help for help)
>>
>>     /usr/share/openvswitch/scripts/ovn-ctl: unknown option
>>     "--db-nb-sync-from=10.0.0.1" (use --help for help)
>>
>>     'ovn-ctl' runs without any error message after I fixed the
>>     command line parameter.
>
>     I am sorry for the misinformation, Andy. What you ran is correct.
>     Could you check the status of the ovsdb servers in h2 after you
>     run the above command using the following commands.
>
>     ovn-ctl status_ovnnb
>     ovn-ctl status_ovnsb
>
>     Both the above commands should return "running/backup". If you see
>     in the OCF script in the function ovsdb_server_start(), we wait
>     indefinitely till  the DB servers are started. Since the 'start'
>     action on h2 times out, I doubt that the servers are not started
>     properly.
>
> O.K. I was able to get both server up.  Mostly by try-and-error.
>
>>         [root at h2 openvswitch]# crm status
>>
>>         Last updated: Fri Oct 14 09:34:50 2016Last change: Thu Oct 13
>>         11:17:25 2016 by root via cibadmin on h2
>>
>>         Stack: corosync
>>
>>         Current DC: h1 (version 1.1.13-10.el7_2.4-44eb2dd) -
>>         partition with quorum
>>
>>         2 nodes and 3 resources configured
>>
>>
>>         *Online*: [ h1 h2 ]
>>
>>
>>         Full list of resources:
>>
>>
>>         *ClusterIP*(ocf::heartbeat:IPaddr2):*Started*h1
>>
>>         *Master*/*Slave*Set: ovndb-*master*[ovndb]
>>
>>         *Master*s: [ h1 ]
>>
>>         *Slave*s: [ h2 ]
>>
> At this point, I think the scripts can work and will probably work for 
> the integration task you had in mind. However, when it does not work, 
> debugging it may not be tribal. Not sure if this is a show stopper. I 
> also don't know pacemaker well enough to compare OVN with other HA 
> components.
>
> From this email thread,  It should be clear the patch set can use more 
> documentation,  1) Enhance ovn-ctl man page  2) Add an integration 
> guide on integration with pacemaker, or add an 'HA' section in the 
> IntegrationGuide.md. 3) consider adding logs in case of error to help 
> trouble shooting, I don't have specific suggestions
>
> Would you please make those changes and post a V2? Thanks.
>

I agree Andy. I will post a V2 soon.

Thank you,
Babu



More information about the dev mailing list