On Friday 07 October 2016 05:33 AM, Andy Zhou wrote:
Babu, Thank you for working on this. At a high level, it is not
clear to me the boundary between ocf scripts and the ovn-ctl script --
i.e. which aspect is managed by which entity. For example,
1) which scripts are responsible for starting the ovsdb servers.
ovsdb servers are started by the pacemaker. It uses the OCF script and
the OCF script uses ovn-ctl.
2) Which script should manage the fail-over -- I tried to shut down a
cluster node using the "pcs" command, and fail-over did not happen.
The OCF script for OVN DB servers is capable of understanding the
promote and demote calls. So, pacemaker will use this script to run
ovsdb server in all the nodes and promote one node as the master(active
server). If the node in which the master instance is running fails,
pacemaker automatically promotes another node as the master. OCF script
is an agent for the pacemaker for the OVN db resource.
The above behavior depends on the way you are configuring the resource
that uses this OCF script. I am attaching a simple set of commands to
configure the ovsdb server. You can create the resources after creating
the cluster with the following command
crm configure < ovndb.pcmk
Please note, you have to replace the macros VM1_NAME, VM2_NAME, VM3_NAME
and MASTER_IP with the respective values before using ovndb.pcmk. This
script works with a 3 node cluster. I am assuming the node ids as 101,
102, and 103. Please replace them as well to work with your cluster.
--
Babu
node $id="101" VM1_NAME
node $id="102" VM2_NAME
node $id="103" VM3_NAME
primitive ovndb_servers ocf:ovn:ovndb-servers params master_ip="MASTER_IP" op
start interval="0s" timeout="30s" op stop interval="0s" timeout="20s" op
promote interval="0s" timeout="50s" op demote interval="0s" timeout="50s" op
monitor interval="10s" timeout="20s"
primitive ovnip ocf:heartbeat:IPaddr2 params ip="MASTER_IP" cidr_netmask="24"
op start interval="0s" timeout="20s" op stop interval="0s" timeout="20s" op
monitor interval="10s" timeout="20s"
ms ovndb_servers-master ovndb_servers meta notify="true"
colocation colocation-ovndb_servers-master-ovnip-INFINITY inf:
ovndb_servers-master:Started ovnip:Master
order order-ovnip-ovndb_servers-master-mandatory inf: ovnip:start
ovndb_servers-master:start
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev