Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Geo Clustering for SUSE Linux Enterprise High Availability Extension 11 SP4

Quick Start

Apart from local clusters and metro area clusters, SUSE® Linux Enterprise High Availability Extension 11 SP4 also supports Geo clusters. That means you can have multiple, geographically dispersed sites with a local cluster each. Failover between these clusters is coordinated by a higher level entity: the booth daemon (boothd). Support for Geo clusters is available as a separate extension to High Availability Extension, called Geo Clustering for SUSE Linux Enterprise High Availability Extension.

Author: Tanja Roth
Publication Date: 09/10/2021

1 Installation as Add-on

For using the High Availability Extension and Geo Clustering for SUSE Linux Enterprise High Availability Extension, you need the packages included in the following installation patterns:

  • High Availability

  • Geographical Clustering

Note
Note: Package Requirements for Arbitrators

If your Geo cluster setup includes one or more arbitrators (see Arbitrator), those only need the pattern Geographical Clustering. For instructions on how to install this pattern, see Section 1.2, “Installing the Packages on Arbitrators”.

Both patterns are only available if you have registered your system at Novell Customer Center (or a local registration server) and have added the respective product channels or installation media as add-ons. For information on how to install add-on products, see the SUSE Linux Enterprise 11 SP4 Deployment Guide, available at http://documentation.suse.com/. Refer to chapter Installing Add-On Products.

1.1 Installing the Packages on Cluster Nodes

In case both High Availability Extension and Geo Clustering for SUSE Linux Enterprise High Availability Extension have been added as add-on products, but the packages are not installed yet, proceed as follows:

  1. To install the packages from both patterns via command line, use Zypper:

    sudo zypper in -t pattern ha_sles ha_geo
  2. Alternatively, use YaST for a graphical installation:

    1. Start YaST as root user and select Software › Software Management.

    2. Click View › Patterns and activate the following patterns:

      • High Availability

      • Geographical Clustering

    3. Click Accept to start installing the packages.

Important
Important: Installing Software Packages on all Parties

The software packages needed for High Availability and Geo clusters are not automatically copied to the cluster nodes.

  • Install SUSE Linux Enterprise Server 11 SP4 and the High Availability and Geographical Clustering patterns on all machines that will be part of your Geo cluster.

  • If you do not want to install the packages manually on all nodes that will be part of your cluster, use AutoYaST to clone existing nodes. Find more information in the High Availability Guide for SUSE Linux Enterprise High Availability Extension 11 SP4, available from http://documentation.suse.com/. Refer to chapter Installation and Basic Setup, section Mass Deployment with AutoYaST.

    For all machines that need the Geo Clustering for SUSE Linux Enterprise High Availability Extension add-on, you currently need to install the packages for Geo clusters manually. AutoYaST support for Geo Clustering for SUSE Linux Enterprise High Availability Extension is not yet available.

1.2 Installing the Packages on Arbitrators

  1. Make sure that Geo Clustering for SUSE Linux Enterprise High Availability Extension has been added as an add-on product to the machines to serve as arbitrators.

  2. Log in to each arbitrator and install the packages with the following command:

    sudo zypper in -t pattern ha_geo

    Alternatively, use YaST to install the Geographical Clustering pattern.

2 Challenges for Geo Clusters

Typically, Geo environments are too far apart to support synchronous communication between the sites. That leads to the following challenges:

  • How to make sure that a cluster site is up and running?

  • How to make sure that resources are only started once?

  • How to make sure that quorum can be reached between the different sites and a split-brain scenario can be avoided?

  • How to keep the CIB up to date on all nodes and sites?

  • How to manage failover between the sites?

  • How to deal with high latency in case of resources that need to be stopped?

In the following sections, learn how to meet these challenges with SUSE Linux Enterprise High Availability Extension.

3 Conceptual Overview

Geo clusters based on SUSE Linux Enterprise High Availability Extension can be considered overlay clusters where each cluster site corresponds to a cluster node in a traditional cluster. The overlay cluster is managed by the booth mechanism. It guarantees that the cluster resources will be highly available across different cluster sites. This is achieved by using cluster objects called tickets that are treated as failover domain between cluster sites, in case a site should be down. Booth guarantees that every ticket is owned by only one site at a time.

The following list explains the individual components and mechanisms that were introduced for Geo clusters in more detail.

Components and Ticket Management
Ticket

A ticket grants the right to run certain resources on a specific cluster site. A ticket can only be owned by one site at a time. Initially, none of the sites has a ticket—each ticket must be granted once by the cluster administrator. After that, tickets are managed by the booth for automatic failover of resources. But administrators may also intervene and grant or revoke tickets manually.

After a ticket is administratively revoked, it is not managed by booth anymore. For booth to start managing the ticket again, the ticket must be again granted to a site.

Resources can be bound to a certain ticket by dependencies. Only if the defined ticket is available at a site, the respective resources are started. Vice versa, if the ticket is removed, the resources depending on that ticket are automatically stopped.

The presence or absence of tickets for a site is stored in the CIB as a cluster status. With regard to a certain ticket, there are only two states for a site: true (the site has the ticket) or false (the site does not have the ticket). The absence of a certain ticket (during the initial state of the Geo cluster) is not treated differently from the situation after the ticket has been revoked. Both are reflected by the value false.

A ticket within an overlay cluster is similar to a resource in a traditional cluster. But in contrast to traditional clusters, tickets are the only type of resource in an overlay cluster. They are primitive resources that do not need to be configured or cloned.

Booth Cluster Ticket Manager

Booth is the instance managing the ticket distribution, and thus, the failover process between the sites of a Geo cluster. Each of the participating clusters and arbitrators runs a service, the boothd. It connects to the booth daemons running at the other sites and exchanges connectivity details. After a ticket has been granted to a site, the booth mechanism can manage the ticket automatically: If the site that holds the ticket is out of service, the booth daemons will vote which of the other sites will get the ticket. To protect against brief connection failures, sites that lose the vote (either explicitly or implicitly by being disconnected from the voting body) need to relinquish the ticket after a time-out. Thus, it is made sure that a ticket will only be redistributed after it has been relinquished by the previous site. See also Dead Man Dependency (loss-policy="fence").

Arbitrator

Each site runs one booth instance that is responsible for communicating with the other sites. If you have a setup with an even number of sites, you need an additional instance to reach consensus about decisions such as failover of resources across sites. In this case, add one or more arbitrators running at additional sites. Arbitrators are single machines that run a booth instance in a special mode. As all booth instances communicate with each other, arbitrators help to make more reliable decisions about granting or revoking tickets. Arbitrators cannot hold any tickets.

An arbitrator is especially important for a two-site scenario: For example, if site A can no longer communicate with site B, there are two possible causes for that:

  • A network failure between A and B.

  • Site B is down.

However, if site C (the arbitrator) can still communicate with site B, site B must still be up and running.

Ticket Failover

If the ticket gets lost, which means other booth instances do not hear from the ticket owner in a sufficiently long time, one of the remaining sites will acquire the ticket. This is what is called ticket failover. If the remaining members cannot form a majority, then the ticket cannot fail over.

Dead Man Dependency (loss-policy="fence")

After a ticket is revoked, it can take a long time until all resources depending on that ticket are stopped, especially in case of cascaded resources. To cut that process short, the cluster administrator can configure a loss-policy (together with the ticket dependencies) for the case that a ticket gets revoked from a site. If the loss-policy is set to fence, the nodes that are hosting dependent resources are fenced.

Warning
Warning: Potential Loss of Data

On the one hand, loss-policy="fence" considerably speeds up the recovery process of the cluster and makes sure that resources can be migrated more quickly.

On the other hand, it can lead to loss of all unwritten data, such as:

  • Data lying on shared storage (for example, DRBD).

  • Data in a replicating database (for example, MariaDB or PostgreSQL) that has not yet reached the other site, because of a slow network link.

Two-Site Cluster (4 Nodes + Arbitrator)
Figure 1: Two-Site Cluster (4 Nodes + Arbitrator)

The most common scenario is probably a Geo cluster with two sites and a single arbitrator on a third site. This requires three booth instances, see Figure 1, “Two-Site Cluster (4 Nodes + Arbitrator)”. The upper limit is (currently) 16 booth instances.

As usual, the CIB is synchronized within each cluster, but it is not automatically synchronized across sites of a Geo cluster. However, as of SUSE Linux Enterprise High Availability Extension 12, transferring resource configurations to other cluster sites is easier than before. For details see Section 9.3, “Transferring the Resource Configuration to Other Cluster Sites”.

4 Requirements

Software Requirements
  • All clusters that will be part of the Geo cluster must be based on SUSE Linux Enterprise High Availability Extension 11 SP4.

  • SUSE® Linux Enterprise Server 11 SP4 must be installed on all arbitrators.

  • The Geo Clustering for SUSE Linux Enterprise High Availability Extension add-on must be installed on all cluster nodes and on all arbitrators that will be part of the Geo cluster.

Network Requirements
  • The sites must be reachable on one UDP and TCP port per booth instance. That means any firewalls or IPsec tunnels in between must be configured accordingly.

  • Other setup decision may require to open more ports (for example, for DRBD or database replication).

Other Requirements and Recommendations
  • All cluster nodes on all sites should synchronize to an NTP server outside the cluster. For more information, see the Administration Guide for SUSE Linux Enterprise Server 11 SP4, available at http://documentation.suse.com/. Refer to the chapter Time Synchronization with NTP.

    If nodes are not synchronized, log files and cluster reports are very hard to analyze.

5 Example Scenario and Basic Steps—Overview

In the following sections, we will use an example scenario as outlined below:

Example 1: Scenario with a Two-Site Cluster, one Arbitrator, and Data Replication via DRBD
  • A Geo cluster with two sites, amsterdam and berlin, and one arbitrator.

  • Each site has a private network routed to the other site:

    • amsterdam: 192.168.201.x

    • berlin: 192.168.202.x

  • Each site runs a two-node cluster:

    • cluster amsterdam consists of the nodes alice and bob

    • cluster berlin consists of the nodes charly and doro

  • Data is replicated across the sites with DRBD in asynchronous mode for disaster recovery.

  • The booth configuration and other important configuration files are synchronized across the cluster sites and the arbitrator using Csync2.

Setting up this scenario takes the following basic steps:

6 Setting Up the Booth Services

The default booth configuration is /etc/booth/booth.conf. This file must be the same on all sites of your Geo cluster, including the arbitrator or arbitrators. To keep the booth configuration synchronous across all sites and arbitrators, use Csync2, as described in Section 6.3, “Synchronizing the Booth Configuration to All Sites and Arbitrators”.

For setups including multiple Geo clusters, it is possible to share the same arbitrator (as of SUSE Linux Enterprise High Availability Extension 12). By providing several booth configuration files, you can start multiple booth instances on the same arbitrator, with each booth instance running on a different port. That way, you can use one machine to serve as arbitrator for different Geo clusters. For details on how to configure booth for multiple Geo clusters, refer to Section 6.2, “Booth Setup for Multiple Tenants”.

6.1 Default Booth Setup

To configure all parameters needed for booth, edit the booth configuration files manually.

Example 2: A Booth Configuration File
transport = UDP 1
port = 9929 2
arbitrator = 147.2.207.14 3
site =  192.168.201.151 4
site =  192.168.202.151 4
ticket = "ticket-nfs" 5
     expire = 600 6
     timeout = 10 7
     retries = 5 8
     renewal-freq = 30 9
     before-acquire-handler10 = /usr/share/booth/service-runnable11 ms_drbd_nfs12
     acquire-after = 60 13
ticket = "ticketA" 5
     expire = 600 6
     timeout = 10 7
     retries = 5 8
     renewal-freq = 30 9
     before-acquire-handler10 = /usr/share/booth/service-runnable11 db-1 12
     acquire-after = 60 13
ticket = "ticketB" 5
     expire = 600 6
     timeout = 10 7
     retries = 5 8
     renewal-freq = 30 9
     before-acquire-handler10 = /usr/share/booth/service-runnable11 db-8 12
     acquire-after = 60 13

1

The transport protocol used for communication between the sites. Only UDP is supported, but other transport layers will follow in the future. Currently, this parameter can therefore be omitted.

2

The port to be used for communication between the booth instances at each site. When not using the default port (9929), choose a port that is not already used for different services. Make sure to open the port in the nodes' and arbitrators' firewalls. The booth clients use TCP to communicate with the boothd. Booth will always bind and listen to both UDP and TCP ports.

3

The IP address of the machine to use as arbitrator. Add an entry for each arbitrator you use in your Geo cluster setup.

4

The IP address used for the boothd on a site. Add an entry for each site you use in your Geo cluster setup. Make sure to insert the correct virtual IP addresses (IPaddr2) for each site, otherwise the booth mechanism will not work correctly. For details on how to configure the virtual IP for booth, see Procedure 6, “Configuring a Resource Group for boothd. Booth works with both IPv4 and IPv6 addresses.

5

The ticket to be managed by booth. For each ticket, add a ticket entry. In this example, the ticket ticket-nfs will be used for failover of NFS and DRBD in the following. See Section 7, “Setting Up DRBD” for details.

6

Optional parameter. Defines the ticket's expiry time in seconds. A site that has been granted a ticket will renew the ticket regularly. If booth does not receive any information about renewal of the ticket within the defined expiry time, the ticket will be revoked and granted to another site. If no expiry time is specified, the ticket will expire after 600 seconds by default. The parameter should not be set to a value less than 120 seconds.

7

Optional parameter. Defines a timeout period in seconds. After that time, booth will resend packets if it did not receive a reply within this period. The timeout defined should be long enough to allow packets to reach other booth members (all arbitrators and sites).

8

Optional parameter. Defines how many times booth retries sending packets before giving up waiting for confirmation by other sites. Values smaller than 3 are invalid and will prevent booth from starting.

9

Optional parameter. Sets the ticket renewal frequency period. Ticket renewal occurs every half expiry time by default. If the network reliability is often reduced over prolonged periods, it is advisable to renew more often. Before every renewal the before-acquire-handler is run.

10

Optional parameter. If set, the specified command will be called before boothd tries to acquire or renew a ticket. On exit code other than 0, boothd relinquishes the ticket.

11

The service-runnable script referenced here is included in the product as an example. It is a simple script based on crm_simulate. It can be used to test whether a particular cluster resource can be run on the current cluster site. That means, it checks if the cluster is healthy enough to run the resource (all resource dependencies are fulfilled, the cluster partition has quorum, no dirty nodes, etc.). For example, if a service in the dependency-chain has a failcount of INFINITY on all available nodes, the service cannot be run on that site. In that case, it is of no use to claim the ticket.

12

The resource to be tested by the before-acquire-handler (in this case, by the service-runnable script). You need to reference the resource that is protected by the respective ticket. In this example, resource db-1 is protected by ticketA whereas db-8 is protected by ticketB. The resource for DRBD (ms_drbd_nfs) is protected by the ticket ticket-nfs.

13

Optional parameter. After a ticket is lost, booth will wait this time in addition before acquiring the ticket. This is to allow for the site that lost the ticket to relinquish the resources, by either stopping them or fencing a node. A typical delay might be 60 seconds, but ultimately it depends on the protected resources and the fencing configuration. The default value is 0.

If you are unsure how long stopping or demoting the resources or fencing a node may take (depending on the loss-policy), use this parameter to prevent resources from running on two sites at the same time.

Procedure 1: Manually Editing The Booth Configuration File
  1. Log in to a cluster node as root or equivalent.

  2. Copy the example booth configuration file /etc/booth/booth.conf.example to /etc/booth/booth.conf.

  3. Edit /etc/booth/booth.conf according to Example 2, “A Booth Configuration File”.

  4. Verify your changes and save the file.

  5. On all cluster nodes and arbitrators, open the port in the firewall that you have configured for booth. See Example 2, “A Booth Configuration File”, position 2.

6.2 Booth Setup for Multiple Tenants

For setups including multiple Geo clusters, it is possible to share the same arbitrator (as of SUSE Linux Enterprise High Availability Extension 12). By providing several booth configuration files, you can start multiple booth instances on the same arbitrator, with each booth instance running on a different port. That way, you can use one machine to serve as arbitrator for different Geo clusters.

Let us assume you have two Geo clusters, one in EMEA (Europe, the Middle East and Africa), and one in the Asia-Pacific region (APAC).

To use the same arbitrator for both Geo clusters, create two configuration files in the /etc/booth directory: /etc/booth/emea.conf and /etc/booth/apac.conf. Both must minimally differ in the following parameters:

  • The port used for the communication of the booth instances.

  • The sites belonging to the different Geo clusters that the arbitrator is used for.

Example 3: /etc/booth/apac.conf
transport = UDP 1
port = 9133 2
arbitrator = 147.2.207.14 3
site = 192.168.2.254 4
site = 192.168.1.112 4
ticket ="tkt-db-apac-intern" 5
     timeout = 10 
     retries = 5 
     renewal-freq = 60 
     before-acquire-handler10 = /usr/share/booth/service-runnable11 db-apac-intern 12
ticket = "tkt-db-apac-cust" 5
     timeout = 10 
     retries = 5 
     renewal-freq = 60 
     before-acquire-handler = /usr/share/booth/service-runnable db-apac-cust
Example 4: /etc/booth/emea.conf
transport = UDP 1
port = 9150 2
arbitrator = 147.2.207.14 3
site = 192.168.201.151 4
site = 192.168.202.151 4
ticket = "tkt-sap-crm" 5
     expire = 900 
     renewal-freq = 60 
     before-acquire-handler10 = /usr/share/booth/service-runnable11 sap-crm 12
ticket = "tkt-sap-prod" 5
     expire = 600 
     renewal-freq = 60 
     before-acquire-handler = /usr/share/booth/service-runnable sap-prod

1

The transport protocol used for communication between the sites. Only UDP is supported, but other transport layers will follow in the future. Currently, this parameter can therefore be omitted.

2

The port to be used for communication between the booth instances at each site. The configuration files use different ports to allow for start of multiple booth instances on the same arbitrator.

3

The IP address of the machine to use as arbitrator. In the examples above, we use the same arbitrator for different Geo clusters.

4

The IP address used for the boothd on a site. The sites defined in both booth configuration files are different, because they belong to two different Geo clusters.

5

The ticket to be managed by booth. Theoretically the same ticket names can be defined in different booth configuration files—the tickets will not interfere because they are part of different Geo clusters that are managed by different booth instances. However, (for better overview) we advise to use distinct ticket names for each Geo cluster as shown in the examples above.

10

Optional parameter. If set, the specified command will be called before boothd tries to acquire or renew a ticket. On exit code other than 0, boothd relinquishes the ticket.

11

The service-runnable script referenced here is included in the product as an example. It is a simple script based on crm_simulate. It can be used to test whether a particular cluster resource can be run on the current cluster site. That means, it checks if the cluster is healthy enough to run the resource (all resource dependencies are fulfilled, the cluster partition has quorum, no dirty nodes, etc.). For example, if a service in the dependency-chain has a failcount of INFINITY on all available nodes, the service cannot be run on that site. In that case, it is of no use to claim the ticket.

12

The resource to be tested by the before-acquire-handler (in this case, by the service-runnable script). You need to reference the resource that is protected by the respective ticket.

Procedure 2: Using the Same Arbitrator for Different Geo Clusters
  1. Create different booth configuration files in /etc/booth as shown in Example 3, “ /etc/booth/apac.conf and Example 4, “ /etc/booth/emea.conf.

  2. On the arbitrator, open the ports that are defined in any of the booth configuration files in /etc/booth.

  3. On the nodes belonging to the individual Geo clusters that the arbitrator is used for, open the port that is used for the respective booth instance.

  4. Synchronize the respective booth configuration files across all cluster nodes and arbitrators that use the same booth configuration. For details, see Section 6.3, “Synchronizing the Booth Configuration to All Sites and Arbitrators”.

  5. On the arbitrator, start the individual booth instances as described in Starting the Arbitrators for multi-tenancy setups.

  6. On the individual Geo clusters, start the booth service as described in Starting the Booth Services on Cluster Sites.

6.3 Synchronizing the Booth Configuration to All Sites and Arbitrators

Note
Note: Use the Same Booth Configuration On All Sites and Arbitrators

To make booth work correctly, all cluster nodes and arbitrators within one Geo cluster must use the same booth configuration.

You can use Csync2 to synchronize the booth configuration. For details, see Section 8.1, “Csync2 Setup for Geo Clusters” and Section 8.2, “Synchronizing Changes with Csync2”.

In case of any booth configuration changes, make sure to update the configuration files accordingly on all parties and to restart the booth services as described in Section 6.5, “Reconfiguring Booth While Running”.

6.4 Enabling and Starting the Booth Services

Starting the Booth Services on Cluster Sites

The booth service for each cluster site is managed by the booth resource group configured in Procedure 6, “Configuring a Resource Group for boothd. To start one instance of the booth service per site, start the respective booth resource group on each cluster site.

Starting the Arbitrators

If you want to configure the booth service to start at boot time, use the following command:

root # chkconfig booth-arbitrator on

After the service has been enabled from command line, YaST System Services (Runlevel) can be used to manage the service.

  • If you are using the default setup as described in Section 6.1, “Default Booth Setup”, only /etc/booth/booth.conf is configured. In that case, log in to each machine you want to use as arbitrator and use the following command to start the booth service:

    root # rcbooth-arbitrator start
  • If you are running booth in multi-tenancy mode as described in Section 6.2, “Booth Setup for Multiple Tenants”, you have configured multiple booth configuration files in /etc/booth. In that case, the following command with start arbitrators for all configuration files found in /etc/booth:

    root # rcbooth-arbitrator start

The booth service is started in arbitrator mode. It can communicate with all other booth daemons but in contrast to the booth daemons running on the cluster sites, it cannot be granted a ticket. Booth arbitrators take part in elections only. Otherwise, they are dormant.

6.5 Reconfiguring Booth While Running

In case you need to change the booth configuration while the booth services are already running, proceed as follows:

  1. Adjust the booth configuration files as desired.

  2. Synchronize the updated booth configuration files to all cluster nodes and arbitrators that are part of your Geo cluster. For details, see Section 8, “Synchronizing Configuration Files Across All Sites and Arbitrators”.

  3. Restart the booth services on the arbitrators and cluster sites as described in Section 6.4, “Enabling and Starting the Booth Services”. This does not have any effect on tickets that have already been granted to sites.

7 Setting Up DRBD

For a description of the overall scenario, see Section 5, “Example Scenario and Basic Steps—Overview”. Assuming that you have two cluster sites that are connected with a routed IPv4 or IPv6 connection and a transmission speed ranging from a few Mbit/sec up to 10Gbit/sec, using a cluster file system across the sites will not be possible, because of the high latency. But you can use DRBD to replicate the data for a quick failover in case one of the sites goes down (active/passive setup). DRBD is a software for replicating storage data by mirroring the content of block devices (hard disks, partitions, logical volumes etc.) between hosts located on different sites. Failover is managed via the booth services, see Booth Cluster Ticket Manager.

7.1 DRBD Scenario and Basic Steps

Figure 2, “DRBD Setup and Resources” shows a graphical representation of the setup and the resources that we will configure in the following.

DRBD Setup and Resources
Figure 2: DRBD Setup and Resources
Scenario—Details
  • A file system is to be served across the Geo cluster via NFS.

  • LVM is used as a storage layer below DRBD.

  • On site amsterdam, DRBD is running in protocol C, a synchronous replication protocol. It uses local IP addresses in a LAN.

  • The upper layer DRDB runs on one node per site, and is responsible for replicating the data to the other site of the Geo cluster.

  • The lower layer DRBD is responsible for the local replication of data (between the nodes of one cluster site). After activating one of the lower DRBD devices on one node per site, the service IP (to be configured as a cluster resource) will be started.

  • The service IP is not only used for the service as such, but also as a fixed point that can be accessed by the upper DRBD device (which runs in secondary state) for replication.

  • On the site that should run the file system service, the upper layer DRBD gets set primary. This means that the file system therein can be mounted and used by applications.

  • Optionally, the DRBD connection to the other site of the Geo cluster may use a DRBD Proxy in between.

For this setup scenario, you need to execute the following basic steps:

  1. Edit the DRBD configuration files to include configuration snippets for each Geo cluster site and the DRBD connection across sites. For details, see the examples in Section 7.2, “DRBD Configuration”.

  2. Configure the cluster resources as explained in Section 9.1, “Resources and Constraints for DRBD”.

  3. Configure booth as described in Section 6, “Setting Up the Booth Services”.

  4. Configure synchronization of DRBD and booth configuration files within each local cluster and across the Geo cluster sites. For details, refer to Section 8, “Synchronizing Configuration Files Across All Sites and Arbitrators”.

7.2 DRBD Configuration

Beginning with DRBD 8.3, the DRBD configuration file is split into separate files. They must be located in the /etc/drbd.d/ directory. The following DRBD configuration snippets show a basic DRBD configuration for the scenario mentioned in Scenario—Details. All snippets can be added to a single DRBD resource configuration file, for example, /etc/drbd.d/nfs.res. This file can then by synchronized using Csync2 as described in Section 8.1, “Csync2 Setup for Geo Clusters”. Note that the DRBD configuration snippets below are bare-bones—they do not include any performance tuning options or similar. For details on how to tune DRBD, see the DRBD chapter in the SUSE Linux Enterprise High Availability Extension Administration Guide, available from http://documentation.suse.com/.

Example 5: DRBD Configuration Snippet for Site 1 (amsterdam)
resource nfs-lower-amsterdam 1{
         disk        /dev/volgroup/lv-nfs; 2
         meta-disk   internal; 3
         device      /dev/drbd0; 4
         protocol    C;  5
         net {
                      shared-secret  "2a9702a6-8747-11e3-9ebb-782bcbd0c11c"; 6
         }

         on alice { 7
                      address         192.168.201.111:7900; 8
         }
         on bob { 7
                      address         192.168.201.112:7900; 8
         } 
}

1

A resource name that allows some association to the respective service (here: NFS). By including the site name too, the complete DRBD configuration can be synchronized across the sites without causing name conflicts.

2

The device that is replicated between the nodes. In our example, LVM is used as a storage layer below DRBD, and the volume group name is volgroup.

3

The meta-disk parameter usually contains the value internal, but it is possible to specify an explicit device to hold the meta data. See http://www.drbd.org/users-guide-emb/ch-internals.html#s-metadata for more information.

4

The device name for DRBD and its minor number. To differentiate between the lower layer DRBD for the local replication and the upper layer DRBD for replication between the Geo cluster sites, the device minor numbers 0 and 10 are used.

5

DRBD is running in protocol C, a synchronous replication protocol. Local write operations on the primary node are considered completed only after both the local and the remote disk write have been confirmed. As a result, loss of a single node is guaranteed not to lead to any data loss. Data loss is, of course, inevitable even with this replication protocol if both nodes (or their storage subsystems) are irreversibly destroyed at the same time.

6

A shared-secret is used to validate connection pairs. You need a different shared-secret for each connection pair. You can get unique values with the UUID program.

7

The on section states which host this configuration statement applies to.

8

The local IP address and port number of the respective node. Each DRBD resource needs an individual port.

Example 6: DRBD Configuration Snippet for Site 2 (berlin)

The configuration for site 2 (berlin) is nearly identical to that for site 1: you can keep the values of most parameters, including the names of the volume group and the logical volume. However, the values of the following parameters need to be changed:

  • Name of the DRBD resource (1)

  • Name and local IP addresses of the nodes (7 and 8).

  • Shared-secret (6)

resource nfs-lower-berlin 1{
         disk        /dev/volgroup/lv-nfs; 2
         meta-disk   internal; 3
         device      /dev/drbd0; 4
         protocol    C;  5
         net {
                      shared-secret "2e9290a0-8747-11e3-a28c-782bcbd0c11c"; 6
         }

         on charly { 7
                      address         192.168.202.111:7900; 8
         }
         on doro { 7
                      address         192.168.202.112:7900; 8
         }
}

1

A resource name that allows some association to the respective service (here: NFS). By including the site name too, the complete DRBD configuration can be synchronized across the sites without causing name conflicts.

2

The device that is replicated between the nodes. In our example, LVM is used as a storage layer below DRBD, and the volume group name is volgroup.

3

The meta-disk parameter usually contains the value internal, but it is possible to specify an explicit device to hold the meta data. See http://www.drbd.org/users-guide-emb/ch-internals.html#s-metadata for more information.

4

The device name for DRBD and its minor number. To differentiate between the lower layer DRBD for the local replication and the upper layer DRBD for replication between the Geo cluster sites, the device minor numbers 0 and 10 are used.

5

DRBD is running in protocol C, a synchronous replication protocol. Local write operations on the primary node are considered completed only after both the local and the remote disk write have been confirmed. As a result, loss of a single node is guaranteed not to lead to any data loss. Data loss is, of course, inevitable even with this replication protocol if both nodes (or their storage subsystems) are irreversibly destroyed at the same time.

6

A shared-secret is used to validate connection pairs. You need a different shared-secret for each connection pair. You can get unique values with the UUID program.

7

The on section states which host this configuration statement applies to.

8

The local IP address and port number of the respective node. Each DRBD resource needs an individual port.

Example 7: DRBD Configuration Snippet for Connection Across Sites
resource nfs-upper 1 {
         disk        /dev/drbd0; 2
         meta-disk   internal; 
         device      /dev/drbd10; 3
         protocol    A;  4
         net {
                      shared-secret  "3105dd88-8747-11e3-a7fd-782bcbd0c11c";  5
                      ping-timeout   20; 6
         }

         stacked-on-top-of           nfs-lower-amsterdam { 7
                      address        192.168.201.151:7910; 8
         }
         stacked-on-top-of           nfs-lower-berlin { 7
                      address        192.168.202.151:7910; 8
         }
}

1

A resource name that allows some association to the respective service (here: NFS). This is the configuration for the upper layer DRBD, responsible for replicating the data to the other site of the Geo cluster.

2

The storage disk to replicate is the DRBD device, /dev/drbd0. You could use /dev/drbd/by-res/nfs-lower-site-N/0 instead, but that would be site-specific and hence would need to be moved into the per-site configuration, that means, below the respective stacked-on-top-of keyword.

3

The device name for DRBD and its minor number. To differentiate between the lower layer DRBD for the local replication and the upper layer DRBD for replication between the Geo cluster sites, the device minor numbers 0 and 10 are used.

4

DRBD is running in protocol A, an asynchronous replication protocol used for long-distance replications. Local write operations on the primary node are considered completed as soon as the local disk write has finished, and the replication packet has been placed in the local TCP send buffer. In the event of forced failover, data loss may occur. The data on the standby node is consistent after failover. However, the most recent updates performed prior to the crash could be lost.

6

Because of the higher latency, set the ping-timeout to 20.

6

A shared-secret is used to validate connection pairs. You need a different shared-secret for each connection pair. You can get unique values with the UUID program.

7

Instead of passing any host names, we tell DRBD to stack upon its lower device. This implies that the lower device must be Primary.

8

To allow TCP/IP connection to the other site of the Geo cluster without knowing which cluster node has the lower DRBD device Primary, use the service IP address configured for NFS. See Procedure 4, “Configuring Resources for a DRBD Setup” for how to configure a service IP.

8 Synchronizing Configuration Files Across All Sites and Arbitrators

To replicate important configuration files across all nodes in the cluster and across Geo clusters, use Csync2. Csync2 can handle any number of hosts, sorted into synchronization groups. Each synchronization group has its own list of member hosts and its include/exclude patterns that define which files should be synchronized in the synchronization group. The groups, the host names belonging to each group, and the include/exclude rules for each group are specified in the Csync2 configuration file, /etc/csync2/csync2.cfg.

For authentication, Csync2 uses the IP addresses and pre-shared keys within a synchronization group. You need to generate one key file for each synchronization group and copy it to all group members.

Csync2 will contact other servers via a TCP port (by default 6556), and uses xinetd to start remote Csync2 instances. For detailed information about Csync2, refer to http://oss.linbit.com/csync2/paper.pdf

8.1 Csync2 Setup for Geo Clusters

How to set up Csync2 for individual clusters with YaST is explained in the High Availability Guide for SUSE Linux Enterprise High Availability Extension, chapter Installation and Basic Setup, section Transferring the Configuration to All Nodes. However, YaST cannot handle more complex Csync2 setups, like those that are needed for Geo clusters. For the following setup, as shown in Figure 3, “Example Csync2 Setup for Geo Clusters”, configure Csync2 manually by editing the configuration files.

To adjust Csync2 for synchronizing files not only within local clusters but also across geographically dispersed sites, you need to define two synchronization groups in the Csync2 configuration:

  • A global group ha_global (for the files that need to be synchronized globally, across all sites and arbitrators belonging to a Geo cluster).

  • A group for the local cluster site ha_local (for the files that need to be synchronized within the local cluster).

For an overview of the multiple Csync2 configuration files for the two synchronization groups, see Figure 3, “Example Csync2 Setup for Geo Clusters”.

Example Csync2 Setup for Geo Clusters
Figure 3: Example Csync2 Setup for Geo Clusters

Authentication key files and their references are displayed in red. The names of Csync2 configuration files are displayed in blue, and their references are displayed in green. For details, refer to Example Csync2 Setup: Configuration Files.

Example Csync2 Setup: Configuration Files
/etc/csync2/csync2.cfg

The main Csync2 configuration file. It is kept short and simple on purpose and only contains the following:

  • The definition of the synchronization group ha_local. The group consists of two nodes (this-site-host-1 and this-site-host-2) and uses /etc/csync2/ha_local.key for authentication. A list of files to be synchronized for this group only is defined in another Csync2 configuration file, /etc/csync2/ha_local.cfg. It is included with the config statement.

  • A reference to another Csync2 configuration file, /etc/csync2.cfg/ha_global.cfg, included with the config statement.

/etc/csync2/ha_local.cfg

This file concerns only the local cluster. It specifies a list of files to be synchronized only within the ha_local synchronization group, as these files are specific per cluster. The most important ones are the following:

  • /etc/csync2/csync2.cfg, as this file contains the list of the local cluster nodes.

  • /etc/csync2/ha_local.key, the authentication key to be used for Csync2 synchronization within the local cluster.

  • /etc/corosync/corosync.conf, as this file defines the communication channels between the local cluster nodes.

  • /etc/corosync/authkey, the Corosync authentication key.

The rest of the file list depends on your specific cluster setup. The files listed in Figure 3, “Example Csync2 Setup for Geo Clusters” are only examples. If you also want to synchronize files for any site-specific applications, include them in ha_local.cfg, too. Even though ha_local.cfg is targeted at the nodes belonging to one site of your Geo cluster, the content may be identical on all sites. If you need different sets of hosts or different keys, adding extra groups may be necessary.

/etc/csync2.cfg/ha_global.cfg

This file defines the Csync2 synchronization group ha_global. The group spans all cluster nodes across multiple sites, including the arbitrator. As it is recommended to use a separate key for each Csync2 synchronization group, this group uses /etc/csync2/ha_global.key for authentication. The include statements define the list of files to be synchronized within the ha_global synchronization group. The most important ones are the following:

  • /etc/csync2/ha_global.cfg and /etc/csync2/ha_global.key (the configuration file for the ha_globalsynchronization group and the authentication key used for synchronization within the group).

  • /etc/booth/booth.conf, the default booth configuration file. In case you are using a booth setup for multiple tenants, replace this file with the different booth configuration files that you have created. See Section 6.2, “Booth Setup for Multiple Tenants” for details.

  • /etc/drbd.conf and /etc/drbd.d (if you are using DRBD within your cluster setup). The DRBD configuration can be globally synchronized, as it derives the configuration from the host names contained in the resource configuration file.

  • /etc/zypp/repos.de. The package repositories are likely to be the same on all cluster nodes.

The other files shown (/etc/root/*) are examples that may be included for reasons of convenience (to make a cluster administrator's life easier).

Note
Note

The files csync2.cfg and ha_local.key are site-specific, which means you need to create different ones for each cluster site. The files are identical on the nodes belonging to the same cluster but different on another cluster. Each csync2.cfg file needs to contain a lists of hosts (cluster nodes) belonging to the site, plus a site-specific authentication key.

The arbitrator needs a csync2.cfg file, too. It only needs to reference ha_global.cfg though.

8.2 Synchronizing Changes with Csync2

To successfully synchronize the files with Csync2, the following prerequisites must be met:

  • The same Csync2 configuration is available on all machines that belong to the same synchronization group.

  • The Csync2 authentication key for each synchronization group must be available on all members of that group.

  • Both Csync2 and xinetd must be running on all nodes and the arbitrator.

Before the first Csync2 run, you therefore need to make the following preparations:

  1. Log in to one machine per synchronization group and generate an authentication key for the respective group:

    csync2 -k NAME_OF_KEYFILE

    However, do not regenerate the key file on any other member of the same group.

    With regard to Figure 3, “Example Csync2 Setup for Geo Clusters”, this would result in the following key files: /etc/csync2/ha_global.key and one local key (/etc/csync2/ha_local.key) per site.

  2. Copy each key file to all members of the respective synchronization group. With regard to Figure 3, “Example Csync2 Setup for Geo Clusters”:

    1. Copy /etc/csync2/ha_global.key to all parties (the arbitrator and all cluster nodes on all sites of your Geo cluster). The key file needs to be available on all hosts listed within the ha_global group that is defined in ha_global.cfg.

    2. Copy the local key file for each site (/etc/csync2/ha_local.key) to all cluster nodes belonging to the respective site of your Geo cluster.

  3. Copy the site-specific /etc/csync2/csync2.cfg configuration file to all cluster nodes belonging to the respective site of your Geo cluster and to the arbitrator.

  4. Execute the following commands on all nodes and the arbitrator to make both xinetd and csync2 services start automatically at boot time:

    root # chkconfig csync2 on
    chkconfig xinetd on
  5. Execute the following commands on all nodes and the arbitrator to start both services

    root # rcxinetd start
Procedure 3: Synchronizing Files with Csync2
  1. To initially synchronize all files once, execute the following command on the machine that you want to copy the configuration from:

    root # csync2 -xv

    This will synchronize all the files once by pushing them to the other members of the synchronization groups. If all files are synchronized successfully, Csync2 will finish with no errors.

    If one or several files that are to be synchronized have been modified on other machines (not only on the current one), Csync2 will report a conflict. You will get an output similar to the one below:

    While syncing file /etc/corosync/corosync.conf:
    ERROR from peer site-2-host-1: File is also marked dirty here!
    Finished with 1 errors.
  2. If you are sure that the file version on the current machine is the best one, you can resolve the conflict by forcing this file and resynchronizing:

    root # csync2 -f /etc/corosync/corosync.conf
    root # csync2 -x

For more information on the Csync2 options, run csync2  -help.

Note
Note: Pushing Synchronization After Any Changes

Csync2 only pushes changes. It does not continuously synchronize files between the machines.

Each time you update files that need to be synchronized, you need to push the changes to the other machines of the same synchronization group: Run csync2  -xv on the machine where you did the changes. If you run the command on any of the other machines with unchanged files, nothing will happen.

9 Configuring Cluster Resources and Constraints

Apart from the resources and constraints that you need to define for your specific cluster setup, Geo clusters require additional resources and constraints as described below. You can either configure them with the crm shell (crmsh) as demonstrated in the examples below, or with the HA Web Konsole (Hawk).

This section focuses on tasks specific to Geo clusters. For an introduction to your preferred cluster management tool and general instructions on how to configure resources and constraints with it, refer to one of the following chapters in the High Availability Guide for SUSE Linux Enterprise High Availability Extension, available from http://documentation.suse.com/:

  • Hawk: Chapter Configuring and Managing Cluster Resources (Web Interface)

  • crmsh: Chapter Configuring and Managing Cluster Resources (Command Line)

Important
Important: No CIB Synchronization Across Sites

The CIB is not automatically synchronized across cluster sites of a Geo cluster. This means you need to configure all resources that must be highly available across the Geo cluster for each site accordingly.

To ease transfer of the configuration to other cluster sites, any resources with site-specific parameters can be configured in such a way that the parameters' values depend on the name of the cluster site where the resource is running.

To make this work, the cluster names for each site must be defined in the respective /etc/corosync/corosync.conf files. For example, /etc/corosync/corosync.conf of site 1 (amsterdam) must contain the following entry:

totem {
   [...]
   cluster_name: amsterdam
   }

After you have configured the resources on one site, you can tag the resources that are needed on all cluster sites, export them from the current CIB, and import them into the CIB of another cluster site. For details, see Section 9.3, “Transferring the Resource Configuration to Other Cluster Sites”.

9.1 Resources and Constraints for DRBD

To complete the DRBD setup, you need to configure some resources and constraints as shown in Procedure 4 and transfer them to the other cluster sites as explained in Section 9.3, “Transferring the Resource Configuration to Other Cluster Sites”.

Procedure 4: Configuring Resources for a DRBD Setup
  1. On one of the nodes of cluster amsterdam, start a shell and log in as root or equivalent.

  2. Enter crm configure to switch to the interactive crm shell.

  3. Configure the (site-dependent) service IP for NFS as a basic primitive:

    crm(live)configure#  primitive ip_nfs ocf:heartbeat:IPaddr2 \
      params iflabel="nfs" nic="eth1" cidr_netmask="24"
      params rule #cluster-name eq amsterdam ip="192.168.201.151" \
      params rule #cluster-name eq berlin ip="192.168.202.151" \
      op monitor interval=10
  4. Configure a file system resource and a resource for the NFS server:

    primitive nfs_fs ocf:heartbeat:Filesystem \
      params device="/dev/drbd/by-res/nfs/0" directory="/mnt/nfs" \
      fstype="ext4"
    primitive nfs_service lsb:nfs
  5. Configure the following primitives and multi-state resources for DRBD:

    crm(live)configure# primitive drbd_nfs ocf:linbit:drbd \
      params drbd_resource="nfs-upper" \
      op monitor interval="31" role="Slave" \
      op monitor interval="30" role="Master"
    primitive drbd_nfs_lower ocf:linbit:drbd \
      params rule #cluster-name eq amsterdam drbd_resource="nfs-lower-amsterdam" \
      params rule #cluster-name eq berlin drbd_resource="nfs-lower-berlin" \                                
      op monitor interval="31" role="Slave" \
      op monitor interval="30" role="Master"
    ms ms_drbd_nfs drbd_nfs \
      meta master-max="1" master-node-max="1" \
      clone-max="1" clone-node-max="1" notify="true"
    ms ms_drbd_nfs_lower drbd_nfs_lower \
      meta master-max="1" master-node-max="1" \
      clone-max="2" clone-node-max="1" notify="true"
  6. Add a group with the following colocation and ordering constraints:

    crm(live)configure# group g_nfs nfs_fs nfs_service
    colocation col_nfs_ip_with_lower  inf: ip_nfs:Started  ms_drbd_nfs_lower:Master
    colocation col_nfs_g_with_upper   inf: g_nfs:Started  ms_drbd_nfs:Master
    colocation col_nfs_upper_with_ip  inf: ms_drbd_nfs:Master  ip_nfs:Started
    order o_lower_drbd_before_ip_nfs  inf: ms_drbd_nfs_lower:promote  ip_nfs:start
    order o_ip_nfs_before_drbd        inf: ip_nfs:start  ms_drbd_nfs:promote
    order o_drbd_nfs_before_svc       inf: ms_drbd_nfs:promote  g_nfs:start
  7. Review your changes with show.

  8. If everything is correct, submit your changes with commit and leave the crm live configuration with exit.

    The configuration is saved to the CIB.

9.2 Ticket Dependencies, Constraints and Resources for booth

To complete the booth setup, you need to execute the following steps to configure the resources and constraints needed for booth and failover of resources:

The resource configurations need to be available on each of the cluster sites. Transfer them to the other sites as described in Section 9.3, “Transferring the Resource Configuration to Other Cluster Sites”.

Procedure 5: Configuring Ticket Dependencies of Resources

For Geo clusters, you can specify which resources depend on a certain ticket. Together with this special type of constraint, you can set a loss-policy that defines what should happen to the respective resources if the ticket is revoked. The attribute loss-policy can have the following values:

  • fence: Fence the nodes that are running the relevant resources.

  • stop: Stop the relevant resources.

  • freeze: Do nothing to the relevant resources.

  • demote: Demote relevant resources that are running in master mode to slave mode.

  1. On one of the nodes of cluster amsterdam, start a shell and log in as root or equivalent.

  2. Enter crm configure to switch to the interactive crm shell.

  3. Configure constraints that define which resources depend on a certain ticket. For example, we need the following constraint for the DRBD scenario outlined in Section 7.1, “DRBD Scenario and Basic Steps”:

    crm(live)configure# rsc_ticket nfs-req-ticket-nfs ticket-nfs: ms_drbd_nfs:Master \
      loss-policy=demote

    This command creates a constraint with the ID nfs-req-ticket-nfs. It defines that the multi-state resource ms_drbd_nfs depends on ticket-nfs. However, only the resource's master mode depends on the ticket. In case ticket-nfs is revoked, ms_drbd_nfs is automatically demoted to slave mode, which in return will put DRBD into Secondary mode. That way, it is ensured that DRBD replication is still running, even if a site does not have the ticket.

  4. If you want other resources to depend on further tickets, create as many constraints as necessary with rsc_ticket.

  5. Review your changes with show.

  6. If everything is correct, submit your changes with commit and leave the crm live configuration with exit.

    The configuration is saved to the CIB.

Example 8: Ticket Dependency for Primitives

Here is another example for a constraint that makes a primitive resource rsc1 depend on ticketA:

crm(live)configure# rsc_ticket rsc1-req-ticketA ticketA: rsc1 loss-policy="fence"

In case ticketA is revoked, the node running the resource should be fenced.

Procedure 6: Configuring a Resource Group for boothd

Each site needs to run one instance of boothd that communicates with the other booth daemons. The daemon can be started on any node, therefore it should be configured as primitive resource. To make the boothd resource stay on the same node, if possible, add resource stickiness to the configuration. As each daemon needs a persistent IP address, configure another primitive with a virtual IP address. Group both primitives:

  1. On one of the nodes of cluster amsterdam, start a shell and log in as root or equivalent.

  2. Enter crm configure to switch to the interactive crm shell.

  3. Enter the following to create both primitive resources and to add them to one group, g-booth:

    crm(live)configure# primitive ip-booth ocf:heartbeat:IPaddr2 \
      params iflabel="ha" nic="eth1" cidr_netmask="24"
      params rule #cluster-name eq amsterdam ip="192.168.201.151" \
      params rule #cluster-name eq berlin ip="192.168.202.151" 
    primitive booth ocf:pacemaker:booth-site \
      meta resource-stickiness="INFINITY" \
      params config="nfs"
      op monitor interval="10s"
    group g-booth ip-booth booth

    With this configuration, each booth daemon will be available at its individual IP address, independent of the node the daemon is running on.

  4. Review your changes with show.

  5. If everything is correct, submit your changes with commit and leave the crm live configuration with exit.

    The configuration is saved to the CIB.

Procedure 7: Adding an Ordering Constraint

If a ticket has been granted to a site but all nodes of that site should fail to host the boothd resource group for any reason, a split-brain situation among the geographically dispersed sites may occur. In that case, no boothd instance would be available to safely manage failover of the ticket to another site. To avoid a potential concurrency violation of the ticket (the ticket is granted to multiple sites simultaneously), add an ordering constraint:

  1. On one of the nodes of cluster amsterdam, start a shell and log in as root or equivalent.

  2. Enter crm configure to switch to the interactive crm shell.

  3. Create an ordering constraint:

    crm(live)configure# order o-booth-before-nfs inf: g-booth ms_drbd_nfs:promote

    The ordering constraint o-booth-before-nfs defines that the resource ms_drbd_nfs can only be promoted to master mode after the g-booth resource group has started.

  4. For any other resources that depend on a certain ticket, define further ordering constraints.

  5. Review your changes with show.

  6. If everything is correct, submit your changes with commit and leave the crm live configuration with exit.

    The configuration is saved to the CIB.

Example 9: Ordering Constraint for Primitives

If the resource that depends on a certain ticket is not a multi-state resource, but a primitive, the ordering constraint would look like the following:

crm(live)configure# order o-booth-before-rsc1 inf: g-booth rsc1

It defines that rsc1 (which depends on ticketA) can only be started after the g-booth resource group.

9.3 Transferring the Resource Configuration to Other Cluster Sites

If you have configured resources for one cluster site as described in Section 9.1 and Section 9.2, you are not done yet. You need to transfer the resource configuration to the other sites of your Geo cluster.

To ease the transfer, you can tag any resources that are needed on all cluster sites, export them from the current CIB, and import them into the CIB of another cluster site. Procedure 8, “Transferring the Resource Configuration to Other Cluster Sites” gives an example of how to do so. It is based on the following prerequisites:

Prerequisites
Note
Note: Upgrading the CIB Syntax Version

Tags (for grouping resources) and some ACL features only work with the CIB syntax version pacemaker-2.0 or higher. For details on how to check this and upgrade the CIB version, see the instructions in the High Availability Guide for SUSE Linux Enterprise High Availability Extension 11 SP4, section Upgrading from SLE HA 11 SP3 to SLE HA 11 SP4.

Procedure 8: Transferring the Resource Configuration to Other Cluster Sites
  1. Log in to one of the nodes of cluster amsterdam.

  2. Start the cluster with:

    root #  rcopenais start
  3. Enter crm configure to switch to the interactive crm shell.

  4. Tag the resources and constraints that are needed across the Geo cluster:

    1. Review the current CIB configuration:

      crm(live)configure#  show
    2. Enter the following command to group the Geo cluster-related resources with the tag geo_resources:

      crm(live)configure# tag geo_resources: \
        ip_nfs nfs_fs nfs_service drbd_nfs drbd_nfs_lower ms_drbd_nfs ms_drbd_nfs_lower g_nfs 1\
        col_nfs_ip_with_lower  col_nfs_g_with_upper col_nfs_upper_with_ip 1\
        o_lower_drbd_before_ip_nfs o_ip_nfs_before_drbd o_drbd_nfs_before_svc 1\
        nfs-req-ticket-nfs ip-booth booth g-booth o-booth-before-nfs 2
        [...] 3

      Tagging does not create any colocation or ordering relationship between the resources.

      1

      Resources and constraints for DRBD, see Section 9.1, “Resources and Constraints for DRBD”.

      2

      Resources and constraints for boothd, see Section 9.2, “Ticket Dependencies, Constraints and Resources for booth”.

      3

      Any other resources of your specific setup that you need on all sites of the Geo cluster.

    3. Review your changes with show.

    4. If the configuration is according to your wishes, submit your changes with submit and leave the crm live shell with exit.

  5. Export the tagged resources and constraints to a file named exported.cib:

    crm configure show tag:geo_resources geo_resources > exported.cib

    The command crm configure show tag: TAGNAME shows all resources that belong to the tag TAGNAME.

  6. Log in to one of the nodes of cluster berlin and proceed as follows:

    1. Start the cluster with:

      root #  rcopenais start
    2. Copy the file exported.cib from cluster amsterdam to this node.

    3. Import the tagged resources and constraints from the file exported.cib into the CIB of cluster berlin:

      crm configure load update PATH_TO_FILE/exported.cib

      When using the update parameter for the crm configure load command, crmsh tries to integrate the contents of the file into the current CIB configuration (instead of replacing the current CIB with the file contents).

    4. View the updated CIB configuration with the following command:

      crm configure show

      The imported resources and constraints will appear in the CIB.

This configuration will result in the following:

  • When granting ticket-nfs to cluster amsterdam, the node hosting the resource ip_nfs will get the IP address 192.168.201.151.

  • When granting ticket-nfs to cluster berlin, the node hosting the resource ip_nfs will get the IP address 192.168.202.151.

Example 10: Referencing Site-Dependent Parameters in Resources

Based on the example in Procedure 4, you can also create resources that reference site-specific parameters of another resource, for example, the IP parameters of ip_nfs. Proceed as follows:

  1. On cluster amsterdam create a dummy resource that references the IP parameters of ip_nfs and uses them as the value of its state parameter:

    crm(live)configure#  primitive dummy1 ocf:pacemaker:Dummy \
      params rule #cluster-name eq amsterdam \
      @ip_nfs-instance_attributes-0-ip:state \
      params rule #cluster-name eq berlin \
      @ip_nfs-instance_attributes-1-ip:state \
      op monitor interval=10
  2. Add a constraint to make the dummy1 resource depend on ticket-nfs, too:

    crm(live)configure# rsc_ticket dummy1-dep-ticket-nfs \
      ticket-nfs: dummy1 loss-policy=stop
  3. Tag the resource and the constraint:

    crm(live)configure# tag geo_resources_2: dummy1
      dummy1-dep-ticket-nfs
  4. Review your changes with show, submit your changes with submit, and leave the crm live shell with exit.

  5. Export the resources tagged with geo_resources_2 from cluster amsterdam and import them into the CIB of cluster berlin, similar to Step 5 through Step 6.d of Procedure 8.

This configuration will result in the following:

  • When granting ticket-nfs to cluster amsterdam, the following file will be created on the node hosting the dummy resource: /var/lib/heartbeat/cores/192.168.201.151.

  • When granting ticket-nfs to cluster berlin, the following file will be created on the node hosting the dummy resource: /var/lib/heartbeat/cores/192.168.202.151.

10 Managing Geo Clusters

Before booth can manage a certain ticket within the Geo cluster, you initially need to grant it to a site manually.

10.1 From Command Line

Use the booth client command line tool to grant, list, or revoke tickets as described in Overview of booth client Commands. The booth client commands can be run on any machine in the cluster, not only the ones having the boothd running. The booth client commands try to find the local cluster by looking at the booth configuration file and the locally defined IP addresses. If you do not specify a site which the booth client should connect to (using the -s option), it will always connect to the local site.

Note
Note: Syntax Changes

The syntax of booth client commands has been simplified since SUSE Linux Enterprise High Availability Extension 11. For example, the client keyword can be omitted for list, grant, or revoke operations: booth list. Also, the -t option can be omitted when specifying a ticket.

The former syntax is still supported. For detailed information, see the Synopsis section in the booth man page. However, the examples in this manual use the simplified syntax.

Overview of booth client Commands
Listing All Tickets
root #  booth list
ticket: ticketA, leader: none
ticket: ticketB, leader: 10.2.12.101, expires: 2014-08-13 10:28:57

If you do not specify a certain site with -s, the information about the tickets will be requested from the local booth instance.

Granting a Ticket to a Site
root #  booth grant -s 192.168.201.151 ticketA
booth[27891]: 2014/08/13_10:21:23 info: grant request sent, waiting for the result ...
booth[27891]: 2014/08/13_10:21:23 info: grant succeeded!

In this case, ticketA will be granted to the site 192.168.201.151. If you omit the -s option, booth will automatically connect to the current site (the site you are running the booth client on) and will request the grant operation.

Before granting a ticket, the command will execute a sanity check. If the same ticket is already granted to another site, you will be warned about that and be prompted to revoke the ticket from the current site first.

Revoking a Ticket From a Site
root #  booth revoke ticketA
booth[27900]: 2014/08/13_10:21:23 info: revoke succeeded!

Booth will check to which site the ticket is currently granted and will request the revoke operation for ticketA. The revoke operation will be executed immediately.

The grant and, under certain circumstances, revoke operations may take a while to return a definite operation's outcome. The client will wait for the result up to the ticket's timeout value before it gives up waiting—unless the -w option was used, in which case the client waits indefinitely. Find the exact status in the log files or with the crm_ticket -L command.

Warning
Warning: crm_ticket and crm site ticket

In case the booth service is not running for any reasons, you may also manage tickets manually with crm_ticket or crm site ticket. Both commands are only available on cluster nodes. In case of intervention, use them with great care as they cannot verify if the same ticket is already granted elsewhere. For more information, read the man pages.

As long as booth is up and running, only use booth client for manual intervention.

After you have initially granted a ticket to a site, the booth mechanism will take over and manage the ticket automatically. If the site holding a ticket should be out of service, the ticket will automatically be revoked after the expiry time and granted to another site. The resources that depend on that ticket will fail over to the new site holding the ticket. The nodes that have run the resources before will be treated according to the loss-policy you set within the constraint.

Procedure 9: Managing Tickets Manually

Assuming that you want to manually move ticket-nfs from site amsterdam (with the virtual IP 192.168.201.151) to site berlin (with the virtual IP 192.168.202.151), proceed as follows:

  1. Set ticket-nfs to standby with the following command:

    root # crm_ticket -t ticket-nfs -s
  2. Wait for any resources that depend on ticket-nfs to be stopped or demoted cleanly.

  3. Revoke ticket-nfs from site amsterdam with:

    root # booth revoke -s 192.168.201.151 ticket-nfs
  4. After the ticket has been revoked from its original site, grant it to the site berlin with:

    booth grant -s 192.168.202.151 ticket-nfs

10.2 With the HA Web Konsole (Hawk)

You can use Hawk as a single point of administration for monitoring multiple clusters. Hawk's Cluster Dashboard allows you to view a summary of multiple clusters, with each summary listing the number of nodes, resources, tickets, and their state. The summary also shows whether any failures have appeared in the respective cluster.

To manage cluster site tickets and to test the impact of ticket failover with the Simulator, you can switch from the Cluster Dashboard to other Hawk functions that are available after logging in to an individual cluster. Hawk allows you to grant or revoke tickets, to view ticket details, and to test the impact of ticket failover with the Simulator.

10.2.1 Monitoring Multiple Clusters with the Cluster Dashboard

The cluster information displayed in the Cluster Dashboard is stored in a persistent cookie. This means you need to decide which Hawk instance you want to view the Cluster Dashboard on, and always use that one. The machine you are running Hawk on does not even need to be part of any cluster for that purpose—it can be a separate, unrelated system.

Procedure 10: Monitoring Multiple Clusters with Hawk
Prerequisites
  • All clusters to be monitored from Hawk's Cluster Dashboard must be running SUSE Linux Enterprise High Availability Extension 11 SP4. It is not possible to monitor clusters that are running earlier versions of SUSE Linux Enterprise High Availability Extension.

  • If you did not replace the self-signed certificate for Hawk on every cluster node with your own certificate (or a certificate signed by an official Certificate Authority), log in to Hawk on every node in every cluster at least once. Verify the certificate (and add an exception in the browser to bypass the warning).

  • If you are using Mozilla Firefox, you must change its preferences to Accept third-party cookies. Otherwise cookies from monitored clusters will not be set, thus preventing login to the clusters you are trying to monitor.

  1. Start the Hawk Web service on a machine you want to use for monitoring multiple clusters.

  2. Start a Web browser and as URL enter the IP address or host name of the machine that runs Hawk:

    https://IPaddress:7630/
  3. On the Hawk login screen, click the Dashboard link in the right upper corner.

    The Add Cluster dialog appears.

  4. Enter a custom Cluster Name with which to identify the cluster in the Cluster Dashboard.

  5. Enter the Host Name of one of the cluster nodes and confirm your changes.

    The Cluster Dashboard opens and shows a summary of the cluster that you have added.

  6. To add more clusters to the dashboard, click the plus icon and enter the details for the next cluster.

    Hawk—Cluster Dashboard
    Figure 4: Hawk—Cluster Dashboard
  7. To remove a cluster from the dashboard, click the x icon next to the cluster's summary.

  8. To view more details about a cluster, click somewhere in the cluster's box on the dashboard.

    This opens a new browser window or new browser tab. If you are not currently logged in to the cluster, this takes you to the Hawk login screen. After having logged in, Hawk shows the Cluster Status of that cluster in the summary view. From here, you can administer the cluster with Hawk as usual.

  9. As the Cluster Dashboard stays open in a separate browser window or tab, you can easily switch between the dashboard and the administration of individual clusters in Hawk.

Any status changes for nodes or resources are reflected almost immediately within the Cluster Dashboard.

10.2.2 Managing Tickets with Hawk

Note
Note: Granting Tickets to Current Site

Though you can view tickets for all sites with Hawk, any grant operations triggered by Hawk only apply to the current site (that you are currently connected to with Hawk). To grant a ticket to another site of your Geo cluster, start Hawk on one of the cluster nodes belonging to the respective site.

Procedure 11: Granting, Revoking and Viewing with Hawk

Tickets are visible in Hawk if they have been granted or revoked at least once or if they are referenced in a ticket dependency. In case a ticket is referenced in a ticket dependency, but has not been granted to any site yet, Hawk displays it as revoked.

  1. Start a Web browser and log in to the cluster.

  2. In the left navigation bar, select Cluster Status.

  3. Switch to the Summary View or the Tree View to view tickets. Along with information about cluster nodes and resources, Hawk also displays a Tickets category.

    It shows the following information:

    • Granted: Tickets that are granted to the current site.

    • Elsewhere: Tickets that are granted to another site.

    • Revoked: Tickets that have been revoked.

    Hawk Cluster Status (Summary View)—Ticket Overview
    Figure 5: Hawk Cluster Status (Summary View)—Ticket Overview
  4. To view more details, either click the title of the Tickets category or the individual ticket entries that are marked as links. Hover the cursor over the information icon next to the ticket to display the following information: time when the ticket was last granted, the leader, and the ticket expiry date.

    Hawk Cluster Status (Summary View)—Ticket Details
    Figure 6: Hawk Cluster Status (Summary View)—Ticket Details
  5. To revoke a ticket, click the wrench icon next to the ticket and select Revoke. Confirm your choice when Hawk prompts for a confirmation.

    If the ticket cannot be revoked for any reason, Hawk shows an error message. After the ticket has been successfully revoked, Hawk will update the ticket status in the Tickets category.

  6. You can only grant tickets that are not already given to any site. To grant a ticket to the current site:

    1. Click the wrench icon next to a ticket with the current status Revoked and select Grant.

    2. Confirm your choice when Hawk prompts for a confirmation.

      If the ticket cannot be granted for any reason, Hawk shows an error message. After the ticket has been successfully granted, Hawk will update the ticket status in the Tickets category.

Procedure 12: Simulating Granting and Revoking Tickets

Hawk's Simulator allows you to explore failure scenarios before they happen. To explore whether your resources that depend on a certain ticket behave as expected, you can also test the impact of granting or revoking tickets.

  1. Start a Web browser and log in to Hawk.

  2. Click the wrench icon next to the user name in the top-level row, and select Simulator.

    Hawk's background changes color to indicate the simulator is active. A simulator dialog opens in the bottom right hand corner of the screen. Its title Simulator (initial state) indicates that the Cluster Status screen still reflects the current state of the cluster.

  3. To simulate status change of a ticket:

    1. Click +Ticket in the simulator control dialog.

    2. Select the Action you want to simulate.

    3. Confirm your changes to add them to the queue of events listed in the controller dialog below Injected State.

  4. To start the simulation, click Run in the simulator control dialog. The Cluster Status screen displays the impact of the simulated events. The simulator control dialog changes to Simulator (final state).

  5. To exit the simulation mode, close the simulator control dialog. The Cluster Status screen switches back to its normal color and displays the current cluster state.

HawkSimulator—Tickets
Figure 7: HawkSimulator—Tickets

For more information about Hawk's Simulator (and which other scenarios can be explored with it), refer to the High Availability Guide for SUSE Linux Enterprise High Availability Extension, available from http://documentation.suse.com/. Refer to chapter Configuring and Managing Cluster Resources (Web Interface), section Exploring Potential Failure Scenarios.

11 Troubleshooting

Booth uses the same logging mechanism as the CRM. Thus, changing the log level will also take effect on booth logging. The booth log messages also contain information about any tickets.

Both the booth log messages and the booth configuration file are included in the hb_report and crm_report.

In case of unexpected booth behavior or any problems, check the system logs for messages or create a detailed cluster report with either hb_report or crm_report.

In case you can access the cluster nodes on all sites (plus the arbitrators) from one single host via SSH, it is possible to collect log files from all of them within the same hb_report. When calling hb_report with the -n option, it gets the log files from all hosts that you specify with -n. (Without -n, it would try to obtain the list of nodes from the respective cluster). For example, to create a single hb_report that includes the log files from two two-node clusters (192.168.201.111|192.168.201.112 and 192.168.202.111|192.168.202.112) plus an arbitrator (147.2.207.14), use the following command:

root #  hb_report -n "147.2.207.14 192.168.201.111 192.168.201.112 \
 192.168.202.111 192.168.202.112"  -f 10:00 -t 11:00 db-incident

If the issue is about booth only and you know on which cluster nodes (within a site) booth is running, then specify only those two nodes plus the arbitrator.

If there is no way to access all sites from one host, run hb_report individually on the arbitrator, and on the cluster nodes of the individual sites, specifying the same period of time. To collect the log files on an arbitrator, you must use the -S option for single node operation:

amsterdam # hb_report -f 10:00 -t 11:00 db-incident-amsterdam
berlin # hb_report -f 10:00 -t 11:00 db-incident-berlin
arbitrator # hb_report -S -f 10:00 -t 11:00 db-incident-arbitrator

However, it is preferable to produce one single hb_report for all machines that you need log files from.

12 Upgrading to the Latest Product Version

For general instructions on how to upgrade a cluster, see the High Availability Guide for SUSE Linux Enterprise High Availability Extension 11 SP4. It is available at http://documentation.suse.com/. The chapter Upgrading Your Cluster and Updating Software Packages also describes which preparations to take care of before starting the upgrade process.

12.1 Upgrading from SLE HA 11 SP3 to SLE HA 11 SP4

The former booth version (v0.1) was based on the Paxos algorithm. The current booth version (v0.2) is loosely based on raft and is incompatible with the one running v0.1. Therefore, rolling upgrades are not possible. Because of the new multi-tenancy feature, the new arbitrator init script cannot stop or test the status of the Paxos v0.1 arbitrator. On upgrade to v0.2, the arbitrator will be stopped, if running. The OCF resource-agent ocf:pacemaker:booth-site is capable of stopping and monitoring the booth v0.1 site daemon.

  1. For an upgrade of the cluster nodes from SUSE Linux Enterprise High Availability Extension 11 SP3 to SUSE Linux Enterprise High Availability Extension 11 SP4, follow the instructions in the High Availability Guide for SUSE Linux Enterprise High Availability Extension 11 SP4, section Upgrading from SLE HA 11 SP3 to SLE HA 11 SP4.

  2. If you use arbitrators outside of the cluster sites:

    1. Upgrade them from SUSE Linux Enterprise Server 11 SP3 to SUSE Linux Enterprise Server 11 SP4, too.

    2. Add the Geo Clustering for SUSE Linux Enterprise High Availability Extension add-on and install the packages as described in Section 1.2, “Installing the Packages on Arbitrators”.

  3. As the syntax and the consensus algorithm for booth has changed, you need to update the booth configuration files to match the latest requirements. Previously you could optionally specify expiry time and weights by appending them to the ticket name with a semicolon (;) as separator. The new syntax has separate tokens for all ticket options. See Section 6, “Setting Up the Booth Services” for details. If you did not specify expiry time or weights different from the defaults, and do not want to use the multi-tenancy feature, you can still use the old /etc/booth/booth.conf.

  4. Synchronize the updated booth configuration files across all cluster sites and arbitrators.

  5. Start the booth service on the cluster sites and the arbitrators as described in Section 6.4, “Enabling and Starting the Booth Services”.

Print this page