Product SiteDocumentation Site

Pacemaker 1.0

Configuration Explained

An A-Z guide to Pacemaker's Configuration Options

Edition 1

Andrew Beekhof

Red Hat

Legal Notice

Copyright © 2009 Andrew Beekhof This material may only be distributed subject to the terms and conditions set forth in the GNU Free Documentation License (GFDL), V1.2 or later (the latest version is presently available at http://www.gnu.org/licenses/fdl.txt).
Abstract
The purpose of this document is to definitively explain the concepts used to configure Pacemaker. To achieve this best, it will focus exclusively on the XML syntax used to configure the CIB.
For those that are allergic to XML, Pacemaker comes with a cluster shell and a Python based GUI exists, however these tools will not be covered at all in this document [1] , precisely because they hide the XML.
Additionally, this document is NOT a step-by-step how-to guide for configuring a specific clustering scenario. Although such guides exist, the purpose of this document is to provide an understanding of the building blocks that can be used to construct any type of Pacemaker cluster.


[1] It is hoped however, that having understood the concepts explained here, that the functionality of these tools will also be more readily understood.


Preface
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. We Need Feedback!
1. Read-Me-First
1.1. The Scope of this Document
1.2. What Is Pacemaker?
1.3. Types of Pacemaker Clusters
1.4. Pacemaker Architecture
1.4.1. Internal Components
2. Configuration Basics
2.1. Configuration Layout
2.2. The Current State of the Cluster
2.3. How Should the Configuration be Updated?
2.4. Quickly Deleting Part of the Configuration
2.5. Updating the Configuration Without Using XML
2.6. Making Configuration Changes in a Sandbox
2.7. Testing Your Configuration Changes
2.8. Do I Need to Update the Configuration on all Cluster Nodes?
3. Cluster Options
3.1. Special Options
3.1.1. Configuration Version
3.1.2. Other Fields
3.1.3. Fields Maintained by the Cluster
3.2. Cluster Options
3.2.1. Available Cluster Options
3.2.2. Querying and Setting Cluster Options
3.2.3. When Options are Listed More Than Once
4. Cluster Nodes
4.1. Defining a Cluster Node
4.2. Describing a Cluster Node
4.3. Adding a New Cluster Node
4.3.1. OpenAIS
4.3.2. Heartbeat
4.4. Removing a Cluster Node
4.4.1. OpenAIS
4.4.2. Heartbeat
4.5. Replacing a Cluster Node
4.5.1. OpenAIS
4.5.2. Heartbeat
5. Cluster Resources
5.1. What is a Cluster Resource
5.2. Supported Resource Classes
5.2.1. Open Cluster Framework
5.2.2. Linux Standard Base
5.2.3. Legacy Heartbeat
5.3. Properties
5.4. Resource Options
5.5. Setting Global Defaults for Resource Options
5.6. Instance Attributes
5.7. Resource Operations
5.7.1. Monitoring Resources for Failure
5.8. Setting Global Defaults for Operations
5.8.1. When Resources Take a Long Time to Start/Stop
5.8.2. Multiple Monitor Operations
5.8.3. Disabling a Monitor Operation
6. Resource Constraints
6.1. Scores
6.1.1. Infinity Math
6.2. Deciding Which Nodes a Resource Can Run On
6.2.1. Options
6.2.2. Asymmetrical "Opt-In" Clusters
6.2.3. Symmetrical "Opt-Out" Clusters
6.2.4. What if Two Nodes Have the Same Score
6.3. Specifying the Order Resources Should Start/Stop In
6.3.1. Mandatory Ordering
6.3.2. Advisory Ordering
6.4. Placing Resources Relative to other Resources
6.4.1. Options
6.4.2. Mandatory Placement
6.4.3. Advisory Placement
6.5. Ordering Sets of Resources
6.6. Collocating Sets of Resources
7. Receiving Notification of Cluster Events
7.1. Configuring Email Notifications
7.2. Configuring SNMP Notifications
8. Rules
8.1. Node Attribute Expressions
8.2. Time/Date Based Expressions
8.2.1. Date Specifications
8.2.2. Durations
8.3. Using Rules to Determine Resource Location
8.3.1. Using score-attribute Instead of score
8.4. Using Rules to Control Resource Options
8.5. Using Rules to Control Cluster Options
8.6. Ensuring Time Based Rules Take Effect
9. Advanced Configuration
9.1. Connecting to the Cluster Configuration from a Remote Machine
9.2. Specifying When Recurring Actions are Performed
9.3. Moving Resources
9.3.1. Manual Intervention
9.3.2. Moving Resources Due to Failure
9.3.3. Moving Resources Due to Connectivity Changes
9.3.4. Resource Migration
9.4. Reusing Rules, Options and Sets of Operations
10. Advanced Resource Types
10.1. Groups - A Syntactic Shortcut
10.1.1. Properties
10.1.2. Options
10.1.3. Using Groups
10.2. Clones - Resources That Should be Active on Multiple Hosts
10.2.1. Properties
10.2.2. Options
10.2.3. Using Clones
10.3. Multi-state - Resources That Have Multiple Modes
10.3.1. Properties
10.3.2. Options
10.3.3. Using Multi-state Resources
11. Protecting Your Data - STONITH
11.1. Why You Need STONITH
11.2. What STONITH Device Should You Use
11.3. Configuring STONITH
11.3.1. Example
12. Status - Here be dragons
12.1. Node Status
12.2. Transient Node Attributes
12.3. Operation History
12.3.1. Simple Example
12.3.2. Complex Resource History Example
A. FAQ
B. More About OCF Resource Agents
B.1. Location of Custom Scripts
B.2. Actions
B.3. How Does the Cluster Interpret the OCF Return Codes?
B.3.1. Exceptions
C. What Changed in 1.0
C.1. New
C.2. Changed
C.3. Removed
D. Installation
D.1. Choosing a Cluster Stack
D.2. Enabling Pacemaker
D.2.1. For OpenAIS
D.2.2. For Heartbeat
E. Upgrading Cluster Software
E.1. Version Compatibility
E.2. Complete Cluster Shutdown
E.2.1. Procedure
E.3. Rolling (node by node)
E.3.1. Procedure
E.3.2. Version Compatibility
E.3.3. Crossing Compatibility Boundaries
E.4. Disconnect and Reattach
E.4.1. Procedure
E.4.2. Notes
F. Upgrading the Configuration from 0.6
F.1. Preparation
F.2. Perform the upgrade
F.2.1. Upgrade the software
F.2.2. Upgrade the Configuration
F.2.3. Manually Upgrading the Configuration
G. Is This init Script LSB Compatible?
H. Sample Configurations
H.1. An Empty Configuration
H.2. A Simple Configuration
H.3. An Advanced Configuration
I. Further Reading
J. Revision History
Index