Document that OVN's native RAFT-based clustered database mode is a
simpler alternative to the Pacemaker-based active-backup setup for new
deployments, and fix various grammar issues along the way.

Modernize the Pacemaker/OCF guidance for the ovndb_servers OCF resource
agent: refresh stale clusterlabs.org links, and update the pcs command
examples from the deprecated Master/Slave resource terminology to the
current Promoted/Unpromoted roles and "promotable" clone syntax, which
Pacemaker uses since 2.1.0 (released in 2021).

Assisted-by: Claude Sonnet 5, Claude Code
Signed-off-by: Xavier Simonart <[email protected]>
---
v2: Udated based on Mark's feedback i.e. drop old nomenclature.
---
 Documentation/topics/integration.rst | 59 +++++++++++++++++-----------
 1 file changed, 37 insertions(+), 22 deletions(-)

diff --git a/Documentation/topics/integration.rst 
b/Documentation/topics/integration.rst
index cb3c6d937..02f6cf37a 100644
--- a/Documentation/topics/integration.rst
+++ b/Documentation/topics/integration.rst
@@ -28,23 +28,40 @@ Integration Guide for Centralized Control
 HA for OVN DB servers using pacemaker
 -------------------------------------
 
+.. note::
+    OVN's northbound and southbound databases also support a native, RAFT
+    based clustered database mode (three or five ovsdb-server instances
+    forming a cluster with no external dependency such as Pacemaker). For
+    most new deployments this is simpler to operate than the active-backup
+    plus Pacemaker setup described below, has built-in quorum-based
+    protection against split-brain (see the "Service Models" section of
+    :manpage:`ovsdb(7)` for a comparison of the two). See the "Clustering
+    options" and "Creating a clustered db" sections of :manpage:`ovn-ctl(8)`
+    for details. The approach described in this section is mainly of
+    interest to sites that already operate this active-backup setup.
+
+.. note::
+    The configuration in this section assumes Pacemaker 2.1.0 or later,
+    which uses the "Promoted"/"Unpromoted" resource role terminology and the
+    ``promotable`` clone option.
+
 The ovsdb servers can work in either active or backup mode. In backup mode, db
-server will be connected to an active server and replicate the active servers
+server will be connected to an active server and replicate the active server's
 contents. At all times, the data can be transacted only from the active server.
 When the active server dies for some reason, entire OVN operations will be
 stalled.
 
-`Pacemaker <http://clusterlabs.org/pacemaker.html>`__ is a cluster resource
-manager which can manage a defined set of resource across a set of clustered
-nodes. Pacemaker manages the resource with the help of the resource agents.
-One among the resource agent is `OCF
-<http://www.linux-ha.org/wiki/OCF_Resource_Agents>`__
+`Pacemaker <https://clusterlabs.org/projects/pacemaker/>`__ is a cluster
+resource manager which can manage a defined set of resources across a set of
+clustered nodes. Pacemaker manages the resource with the help of the resource
+agents. One among the resource agent is `OCF
+<https://clusterlabs.org/projects/pacemaker/doc/2.1/Pacemaker_Administration/html/agents.html>`__
 
 OCF is nothing but a shell script which accepts a set of actions and returns an
 appropriate status code.
 
 With the help of the OCF resource agent ovn/utilities/ovndb-servers.ocf, one
-can defined a resource for the pacemaker such that pacemaker will always
+can define a resource for the pacemaker such that pacemaker will always
 maintain one running active server at any time.
 
 After creating a pacemaker cluster, use the following commands to create one
@@ -54,9 +71,8 @@ active and multiple backup servers for OVN databases::
          master_ip=x.x.x.x \
          ovn_ctl=<path of the ovn-ctl script> \
          op monitor interval="10s" \
-         op monitor role=Master interval="15s"
-    $ pcs resource master ovndb_servers-master ovndb_servers \
-        meta notify="true"
+         op monitor role=Promoted interval="15s" \
+         promotable meta notify="true"
 
 The `master_ip` and `ovn_ctl` are the parameters that will be used by the OCF
 script. `ovn_ctl` is optional, if not given, it assumes a default value of
@@ -67,13 +83,13 @@ to connect to the master node. You can add the optional 
parameters
 to set the protocol and port.
 
 Whenever the active server dies, pacemaker is responsible to promote one of the
-backup servers to be active. Both ovn-controller and ovn-northd needs the
+backup servers to be active. Both ovn-controller and ovn-northd need the
 ip-address at which the active server is listening. With pacemaker changing the
 node at which the active server is run, it is not efficient to instruct all the
 ovn-controllers and the ovn-northd to listen to the latest active server's
 ip-address.
 
-This problem can be solved by two ways:
+This problem can be solved in two ways:
 
 1. By using a native ocf resource agent ``ocf:heartbeat:IPaddr2``.  The IPAddr2
 resource agent is just a resource with an ip-address. When we colocate this
@@ -86,25 +102,24 @@ with the active server::
 
     $ pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=x.x.x.x \
         op monitor interval=30s
-    $ pcs constraint order promote ovndb_servers-master then VirtualIP
-    $ pcs constraint colocation add VirtualIP with master ovndb_servers-master 
\
-        score=INFINITY
+    $ pcs constraint order promote ovndb_servers-clone then VirtualIP
+    $ pcs constraint colocation add VirtualIP \
+        with Promoted ovndb_servers-clone score=INFINITY
 
 2. Using load balancer vip ip as a master_ip.  In order to use this feature,
-one needs to use listen_on_master_ip_only to no.  Current code for load
-balancer have been tested to work with tcp protocol and needs to be
-tested/enchanced for ssl/tls. Using load balancer, standby nodes will not
+one needs to set listen_on_master_ip_only to no.  Current code for load
+balancer has been tested to work with tcp protocol and needs to be
+tested/enhanced for ssl/tls. Using load balancer, standby nodes will not
 listen on nb and sb db ports so that load balancer will always communicate to
 the active node and all the traffic will be sent to active node only.  Standby
 will continue to sync using LB VIP IP in this case.
 
-Use the following command to create pcs resource using LB VIP IP::
+Use the following command to create a pcs resource using LB VIP IP::
 
     $ pcs resource create ovndb_servers ocf:ovn:ovndb-servers \
          master_ip="<load_balance_vip_ip>" \
          listen_on_master_ip_only="no" \
          ovn_ctl=<path of the ovn-ctl script> \
          op monitor interval="10s" \
-         op monitor role=Master interval="15s"
-    $ pcs resource master ovndb_servers-master ovndb_servers \
-        meta notify="true"
+         op monitor role=Promoted interval="15s" \
+         promotable meta notify="true"
-- 
2.56.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to