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

Andy Zhou azhou at ovn.org
Fri Nov 11 08:48:55 UTC 2016


On Mon, Nov 7, 2016 at 11:55 PM, Babu Shanmugam <bschanmu at redhat.com> wrote:

>
>
> On Monday 07 November 2016 06:49 PM, Andy Zhou wrote:
>
> This version is better, I am able to apply them. Thanks.
>
> I got the system running, but managed to get system into a state where
> both machines (centos and centos2)
> are running the ovsdb in a backup mode.   The output of "pcs status" shows
> an error message, but the message is not
> very helpful.  Any suggestion on how to debug this?
>
> root at centos:/# pcs status
> Cluster name: mycluster
> Last updated: Mon Nov  7 05:12:06 2016 Last change: Mon Nov  7 05:08:24
> 2016 by root via cibadmin on centos
> Stack: corosync
> Current DC: centos2 (version 1.1.13-10.el7_2.4-44eb2dd) - partition with
> quorum
> 2 nodes and 3 resources configured
>
> Node centos: standby
> Online: [ centos2 ]
>
> Full list of resources:
>
>  virtip (ocf::heartbeat:IPaddr): Started centos2
>  Master/Slave Set: ovndb_servers_master [ovndb_servers]
>      Stopped: [ centos centos2 ]
>
> Failed Actions:
> * ovndb_servers_start_0 on centos2 'unknown error' (1): call=18,
> status=Timed Out, exitreason='none',
>     last-rc-change='Mon Nov  7 02:28:07 2016', queued=0ms, exec=30002ms
>
>
> PCSD Status:
>   centos: Online
>   centos2: Online
>
> Daemon Status:
>   corosync: active/enabled
>   pacemaker: active/enabled
>   pcsd: active/enabled
>
> --------------------------------------------
> root at centos:/# pcs config
> Cluster Name: mycluster
> Corosync Nodes:
>  centos centos2
> Pacemaker Nodes:
>  centos centos2
>
> Resources:
>  Resource: virtip (class=ocf provider=heartbeat type=IPaddr)
>   Attributes: ip=192.168.122.200 cidr_netmask=24
>   Operations: start interval=0s timeout=20s (virtip-start-interval-0s)
>               stop interval=0s timeout=20s (virtip-stop-interval-0s)
>               monitor interval=30s (virtip-monitor-interval-30s)
>  Master: ovndb_servers_master
>   Meta Attrs: notify=true
>   Resource: ovndb_servers (class=ocf provider=ovn type=ovndb-servers)
>    Attributes: master_ip=192.168.122.200
>
>
> Andy, you don't seem to have defined an attribute for ovn_ctl. It means,
> the ovn-ctl script will be assumed to be present in /usr/share/openvswitch/scripts/ovn-ctl.
> Can you check if you have ovn-ctl at the correct location?
>
Yes, The script was installed there.


> If not, please define an attribute similar to master_ip and name it
> ovn_ctl and point that to the correct location of ovn-ctl ?
>
> The document says "ovn-ctl" is optional. I now changed to have it fully
specified, but makes no difference. There are some log information towards
the end of email if they help. Overall, it could just be something weird
about my system, I am not sure it will
be worth while to track it down.  On the other hand, I will be happy to
provide more information about the my setup in case they
are useful.

> Is the user expected to populate those files by hand?  If yes, what IP
> address should be used? The floating IP?
>
>
> This file will have to be populated by the user, only when the user wants
> ovn-northd to connect to a different set of DB urls, other than unix
> sockets in that same machine.
> The IP address depends  on the setup. The pacemaker script uses the
> master-ip address that you supply to the OCF resource as an attribute.
>
> Thanks. Should this be added to IntegrationGuide.rst?

More logs..

root at centos:~# ls -l /usr/share/openvswitch/scripts/ovn-ctl

-rwxr-xr-x. 1 root root 15539 Nov  7 02:12
/usr/share/openvswitch/scripts/ovn-ctl

Resources:
 Resource: virtip (class=ocf provider=heartbeat type=IPaddr)
  Attributes: ip=192.168.122.200 cidr_netmask=24
  Operations: start interval=0s timeout=20s (virtip-start-interval-0s)
              stop interval=0s timeout=20s (virtip-stop-interval-0s)
              monitor interval=30s (virtip-monitor-interval-30s)
 Master: ovndb_servers_master
  Meta Attrs: notify=true
  Resource: ovndb_servers (class=ocf provider=ovn type=ovndb-servers)
   Attributes: master_ip=192.168.122.200
ovn_ctl=/usr/share/openvswitch/scripts/ovn-ctl
   Operations: start interval=0s timeout=30s
(ovndb_servers-start-interval-0s)
               stop interval=0s timeout=20s (ovndb_servers-stop-interval-0s)
               promote interval=0s timeout=50s
(ovndb_servers-promote-interval-0s)
               demote interval=0s timeout=50s
(ovndb_servers-demote-interval-0s)
               monitor interval=10s (ovndb_servers-monitor-interval-10s)


pcs status still shows ovsdb are offline on both hosts:
==========================================
Cluster name: mycluster
Last updated: Fri Nov 11 00:33:10 2016          Last change: Fri Nov 11
00:09:13 2016 by root via crm_attribute on centos2
Stack: corosync
Current DC: centos (version 1.1.13-10.el7_2.4-44eb2dd) - partition with
quorum
2 nodes and 3 resources configured

Online: [ centos centos2 ]

Full list of resources:

 virtip (ocf::heartbeat:IPaddr):        Started centos
 Master/Slave Set: ovndb_servers_master [ovndb_servers]
     Stopped: [ centos centos2 ]

Failed Actions:
* ovndb_servers_start_0 on centos 'unknown error' (1): call=18,
status=Timed Out, exitreason='none',
    last-rc-change='Fri Nov 11 00:09:13 2016', queued=0ms, exec=30280ms
* ovndb_servers_start_0 on centos2 'unknown error' (1): call=13,
status=Timed Out, exitreason='none',
    last-rc-change='Fri Nov 11 00:07:42 2016', queued=0ms, exec=30234ms


PCSD Status:
  centos: Online
  centos2: Online


More information about the dev mailing list