Product SiteDocumentation Site

Pacemaker 1.1

Configuration Explained

An A-Z guide to Pacemaker's Configuration Options

Edizione 1

Andrew Beekhof

Primary author 
Red Hat

Dan Frîncu

Romanian translation 

Philipp Marek

Style and formatting updates. Indexing. 
LINBit

Tanja Roth

Utilization chapter Resource Templates chapter Multi-Site Clusters chapter 
SUSE

Lars Marowsky-Bree

Multi-Site Clusters chapter 
SUSE

Yan Gao

Utilization chapter Resource Templates chapter Multi-Site Clusters chapter 
SUSE

Thomas Schraitle

Utilization chapter Resource Templates chapter Multi-Site Clusters chapter 
SUSE

Dejan Muhamedagic

Resource Templates chapter 
SUSE

Nota Legale

Copyright © 2009-2011 Andrew Beekhof.
The text of and illustrations in this document are licensed under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA")[2].
In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
In addition to the requirements of this license, the following activities are looked upon favorably:
  1. If you are distributing Open Publication works on hardcopy or CD-ROM, you provide email notification to the authors of your intent to redistribute at least thirty days before your manuscript or media freeze, to give the authors time to provide updated documents. This notification should describe modifications, if any, made to the document.
  2. All substantive modifications (including deletions) be either clearly marked up in the document or else described in an attachment to the document.
  3. Finally, while it is not mandatory under this license, it is considered good form to offer a free copy of any hardcopy or CD-ROM expression of the author(s) work.

Sommario

The purpose of this document is to definitively explain the concepts used to configure Pacemaker. To achieve this, it will focus exclusively on the XML syntax used to configure the CIB.
For those that are allergic to XML, there exist several unified shells and GUIs for Pacemaker. 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. Try the Clusters from Scratch document instead.


[1] I hope, however, that the concepts explained here make the functionality of these tools more easily understood.

Indice

Prefazione
1. Convenzioni del documento
1.1. Convenzioni tipografiche
1.2. Convenzioni del documento
1.3. Note ed avvertimenti
2. We Need Feedback!
1. Leggimi-Prima
1.1. Scopo di questo documento
1.2. Cos'è Pacemaker?
1.3. Tipologia dei cluster Pacemaker
1.4. Architettura di Pacemaker
1.4.1. Panoramica concettuale dello Stack
1.4.2. Componenti interni
2. Nozioni di base sulla configurazione
2.1. Layout della configurazione
2.2. Lo stato attuale del Cluster
2.3. Come dovrebbe essere aggiornata la configurazione?
2.4. Eliminare velocemente parte della configurazione
2.5. Aggiornare la configurazione senza utilizzare XML
2.6. Effettuare modifiche alla configurazione in un ambiente di prova
2.7. Testare le proprie modifiche
2.8. Interpretare l'output di Graphviz
2.8.1. Una piccola transizione del cluster
2.8.2. Una complessa transizione del cluster
2.9. Esiste l'esigenza di aggiornare la configurazione su tutti i nodi del cluster?
3. Opzioni del cluster
3.1. Opzioni speciali
3.2. Versione della configurazione
3.3. Altri campi
3.4. Campi gestiti dal cluster
3.5. Opzioni del cluster
3.6. Opzioni disponibili nel cluster
3.7. Interrogare e valorizzare le opzioni del cluster
3.8. Quando le opzioni vengono elencate più di una volta
4. Nodi del cluster
4.1. Definire un nodo del cluster
4.2. Where Pacemaker Gets the Node Name
4.3. Descrivere un nodo del cluster
4.4. Corosync
4.4.1. Adding a New Corosync Node
4.4.2. Removing a Corosync Node
4.4.3. Replacing a Corosync Node
4.5. CMAN
4.5.1. Adding a New CMAN Node
4.5.2. Removing a CMAN Node
4.6. Heartbeat
4.6.1. Adding a New Heartbeat Node
4.6.2. Removing a Heartbeat Node
4.6.3. Replacing a Heartbeat Node
5. Risorse del cluster
5.1. Cos'è una risorsa del cluster
5.2. Classi di risorse supportate
5.2.1. Open Cluster Framework
5.2.2. Linux Standard Base
5.2.3. Systemd
5.2.4. Upstart
5.2.5. System Services
5.2.6. STONITH
5.3. Resource Properties
5.4. Opzioni delle risorse
5.5. Settaggio dei valori di default globali per le opzioni delle risorse
5.6. Attributi dell'istanza
5.7. Operazioni sulle risorse
5.7.1. Monitoraggio di anomalie sulle risorse
5.7.2. Settaggio dei valori di default globali per le operazioni
6. Vincoli delle risorse
6.1. Punteggi
6.1.1. Il valore INFINITY
6.2. Decidere quale nodo può erogare una risorsa
6.2.1. Opzioni
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 in which Order Resources Should Start/Stop
6.3.1. Mandatory Ordering
6.3.2. Advisory Ordering
6.4. Placing Resources Relative to other Resources
6.4.1. Opzioni
6.4.2. Mandatory Placement
6.4.3. Advisory Placement
6.5. Ordering Sets of Resources
6.6. Ordered Set
6.7. Two Sets of Unordered Resources
6.8. Three Resources Sets
6.9. Collocating Sets of Resources
6.10. Another Three Resources Sets
7. Receiving Notification for Cluster Events
7.1. Configuring SNMP Notifications
7.2. Configuring Email Notifications
7.3. Configuring Notifications via External-Agent
8. Regole
8.1. Espressioni relative agli attributi del nodo
8.2. Espressioni basate su Ora/Data
8.2.1. Dichiarare date
8.2.2. Durate
8.3. Espressioni temporali di esempio
8.4. Utilizzare regole per determinare il posizionamento delle risorse
8.4.1. Utilizzo di score-attribute invece di score
8.5. Utilizzare regole per controllare le opzioni delle risorse
8.6. Utilizzare le regole per controllare le opzioni del cluster
8.7. Assicurarsi che le regole basate sugli orari abbiano effetto
9. Configurazione avanzata
9.1. Connecting from a Remote Machine
9.2. Specificare tempistiche per le azioni ricorrenti
9.3. Spostare le risorse
9.3.1. Intervenire manualmente
9.3.2. Spostare risorse in seguito ad un fallimento
9.3.3. Spostare le risorse in base a variazioni della connettività
9.3.4. Migrazione delle risorse
9.4. Riutilizzare regole, opzioni e set di operazioni
9.5. Effettuare il reload dei servizi dopo una variazione della definizione
10. Tipi di risorse avanzati
10.1. Gruppi - Una scorciatoia sintattica
10.1.1. Group Properties
10.1.2. Group Options
10.1.3. Group Instance Attributes
10.1.4. Group Contents
10.1.5. Group Constraints
10.1.6. Group Stickiness
10.2. Clones - Resources That Get Active on Multiple Hosts
10.2.1. Clone Properties
10.2.2. Clone Options
10.2.3. Clone Instance Attributes
10.2.4. Clone Contents
10.2.5. Clone Constraints
10.2.6. Clone Stickiness
10.2.7. Clone Resource Agent Requirements
10.3. Multi-state - Risorse con modalità multipla
10.3.1. Multi-state Properties
10.3.2. Multi-state Options
10.3.3. Multi-state Instance Attributes
10.3.4. Multi-state Contents
10.3.5. Monitoraggio delle risorse multi-state
10.3.6. Multi-state Constraints
10.3.7. Multi-state Stickiness
10.3.8. Quale istanza della risorsa è promossa
10.3.9. Multi-state Resource Agent Requirements
10.3.10. Multi-state Notifications
10.3.11. Multi-state - Proper Interpretation of Notification Environment Variables
11. Utilization and Placement Strategy
11.1. Background
11.2. Utilization attributes
11.3. Placement Strategy
11.4. Allocation Details
11.4.1. Which node is preferred to be chosen to get consumed first on allocating resources?
11.4.2. Which resource is preferred to be chosen to get assigned first?
11.5. Limitations
11.6. Strategies for Dealing with the Limitations
12. Resource Templates
12.1. Abstract
12.2. Configuring Resources with Templates
12.3. Referencing Templates in Constraints
13. Configure STONITH
13.1. What Is STONITH
13.2. Quale STONITH device si dovrebbe usare
13.3. Configurare STONITH
13.4. Esempio
14. Status - Here be dragons
14.1. Stato dei nodi
14.2. Attributi dei nodi transitori
14.3. Storico delle operazioni
14.3.1. Un semplice esempio
14.3.2. Un complesso esempio di storico per risorsa
15. Multi-Site Clusters and Tickets
15.1. Abstract
15.2. Challenges for Multi-Site Clusters
15.3. Conceptual Overview
15.3.1. Components and Concepts
15.4. Configuring Ticket Dependencies
15.5. Managing Multi-Site Clusters
15.5.1. Granting and Revoking Tickets Manually
15.5.2. Granting and Revoking Tickets via a Cluster Ticket Registry
15.5.3. General Management of Tickets
15.6. For more information
A. FAQ
B. Maggiori informazioni sui Resource Agent OCF
B.1. Dove si trovano gli script personalizzati
B.2. Azioni
B.3. How are OCF Return Codes Interpreted?
B.4. OCF Return Codes
B.5. Eccezioni
C. Cosa è cambiato nella versione 1.0
C.1. Nuovo
C.2. Modifiche
C.3. Rimozioni
D. Installazione
D.1. Scegliere lo stack del cluster
D.2. Abilitare Pacemaker
D.2.1. Per Corosync
D.2.2. Per Heartbeat
E. Aggiornare il software del cluster
E.1. Compatibilità delle versioni
E.2. Completo spegnimento del cluster
E.2.1. Procedura
E.3. Rolling (nodo dopo nodo)
E.3.1. Procedura
E.3.2. Compatibilità delle versioni
E.3.3. Limiti di compatibilità
E.4. Disconnessione e riaggancio
E.4.1. Procedura
E.4.2. Note
F. Aggiornare la configurazione dalla versione 0.6
F.1. Preparazione
F.2. Effettuale l'aggiornamento
F.2.1. Aggiornamento del software
F.2.2. Aggiornare la configurazione
F.2.3. Aggiornamento manuale della configurazione
G. init-Script LSB Compliance
H. Configurazioni di esempio
H.1. Empty
H.2. Simple
H.3. Advanced Configuration
I. Approfondimenti
J. Revision History
Indice analitico

Lista delle figure

1.1. Ridondanza Active/Passive
1.2. Failover condiviso
1.3. Ridondanza N a N
1.4. Panoramica concettuale dello stack del cluster
1.5. Lo stack Pacemaker nell'esecuzione su Corosync
1.6. Subsystems of a Pacemaker cluster
6.1. Visual representation of the four resources' start order for the above constraints
6.2. Visual representation of the start order for two ordered sets of unordered resources
6.3. Visual representation of the start order for the three sets defined above
6.4. Visual representation of a colocation chain where the members of the middle set have no inter-dependencies

Lista delle tabelle

3.1. Proprietà relative alla versione della configurazione
3.2. Properties Controlling Validation
3.3. Proprietà gestite dal cluster
3.4. Opzioni del cluster
5.1. Proprietà di una Primitive Resource
5.2. Opzioni per una Primitive Resource
5.3. Proprietà di un'operazione
6.1. Opzioni per semplici vincoli di locazione (location constraints)
6.2. Properties of an Ordering Constraint
6.3. Properties of a Collocation Constraint
7.1. Environment Variables Passed to the External Agent
8.1. Proprietà di una regola
8.2. Proprietà di un'espressione
8.3. Proprietà di un'espressione basata sulla data
8.4. Prorpietà di una specifica data
9.1. Variabili d'ambiente utilizzate per connettersi ad istanze remote del CIB
9.2. Opzioni top-level extra per l'accesso remoto
9.3. Common Options for a ping Resource
10.1. Proprietà di un gruppo di risorse
10.2. Proprietà di una risorsa di tipo clone
10.3. Opzioni specifiche di configurazione per le risorse Clone
10.4. Variabili d'ambiente fornite alle azioni notify delle risorse clone
10.5. Proprietà delle risorse multi-state
10.6. Opzioni di configurazione specifiche alle risorse multi-state
10.7. Opzioni aggiuntive per le constraint relative alle risorse multi-state
10.8. Implicazioni dei ruoli nei return code OCF
10.9. Environment variables supplied with Master notify actions
14.1. Sorgenti autoritative per le informazioni di stato
14.2. Campi relativi allo status dei nodi
14.3. Contents of an lrm_rsc_op job
B.1. Azioni richieste per gli agenti OCF
B.2. Azioni facoltative per gli agent OCF
B.3. Tipi di ripristino effettuati dal cluster
B.4. OCF Return Codes and their Recovery Types
E.1. Riepilogo delle metodologie di aggiornamento
E.2. Tabella della compatibilità delle versioni

Lista degli esempi

2.1. Una configurazione vuota
2.2. Esempio dell'output di crm_mon
2.3. Esempio dell'output di crm_mon -n
2.4. Utilizzare un editor per modificare la configurazione del cluster in sicurezza
2.5. Utilizzare in sicurezza un editor per modificare una sotto sezione della configurazione del cluster
2.6. Ricerca di oggetti relativi alla configurazione di STONITH
2.7. Creazione e visualizzazione dell'ambiente di test
2.8. Utilizzare un ambiente di test per effettuare più cambiamenti contemporaneamente
3.1. Un esempio dei campi settati per un oggetto cib
3.2. Cancellare un'opzione dichiarata due volte
4.1. Example Heartbeat cluster node entry
4.2. Example Corosync cluster node entry
4.3. Risultato dell'utilizzo di crm_attribute per specificare quale kernel sta funzionando su pcmk-1
5.1. An example system resource
5.2. Un esempio di risorsa OCF
5.3. Una risorsa LSB con le opzioni cluster
5.4. Una risorsa OCF di esempio con attributi di istanza
5.5. Visualizzazione dei metadata per il template del resource agent Dummy
5.6. Una risorsa OCF con un controllo dello stato di salute ciclico
5.7. Una risorsa OCF on timeout personalizzato per le proprie azioni implicite
5.8. An OCF resource with two recurring health checks, performing different levels of checks - specified via OCF_CHECK_LEVEL.
5.9. Esempio di una risorsa OCF con controllo di sanità disabilitato
6.1. Example set of opt-in location constraints
6.2. Example set of opt-out location constraints
6.3. Example of two resources that prefer two nodes equally
6.4. Example of an optional and mandatory ordering constraint
6.5. A chain of ordered resources
6.6. A chain of ordered resources expressed as a set
6.7. A group resource with the equivalent ordering rules
6.8. Ordered sets of unordered resources
6.9. Advanced use of set ordering - Three ordered sets, two of which are internally unordered
6.10. A chain of collocated resources
6.11. The equivalent colocation chain expressed using resource_sets
6.12. Using colocation sets to specify a common peer.
6.13. A colocation chain where the members of the middle set have no inter-dependencies and the last has master status.
7.1. Configuring ClusterMon to send SNMP traps
7.2. Configuring ClusterMon to send email alerts
7.3. Configuring ClusterMon to execute an external-agent
8.1. Vero se "now" è un qualsiasi momento nell'anno 2005
8.2. Equivalent expression
8.3. 9:00-17:00, lunedì-venerdì
8.4. 9:00-18:00, lunedì-venerdì, o qualsiasi ora di sabato
8.5. 9:00-17:00 o 21:00-24:00, lunedì-venerdì
8.6. Tutti i lunedì del mese di marzo 2005
8.7. In luna piena di venerdì 13
8.8. Impedisci a myApacheRsc di essere eseguita su c001n03
8.9. Impedisci a myApacheRsc di essere eseguita su c001n03 - versione estesa
8.10. Una sezione nodi di esempio da utilizzare con score-attribute
8.11. Definire opzioni per le risorse differenti in base al nome del nodo
8.12. Change resource-stickiness during working hours
9.1. Specificare una base di partenza per gli intervalli relativi alle azioni ricorrenti
9.2. An example ping cluster resource that checks node connectivity once every minute
9.3. Don’t run on unconnected nodes
9.4. Run only on nodes connected to three or more ping nodes; this assumes multiplier is set to 1000:
9.5. Prediligi il nodo che il maggior numero di nodi ping
9.6. Come il cluster traduce le constraint pingd
9.7. Un esempio più complesso di location basata sui valori di connettività
9.8. Referenziare regole da altre constraint
9.9. Referencing attributes, options, and operations from other resources
9.10. The DRBD Agent’s Control logic for Supporting the reload Operation
9.11. La logica di controllo dell'operazione di reload implementata dall'agente DRBD
9.12. Paramtro modificabile utilizzando reload
10.1. Un esempio di gruppo
10.2. Come il gruppo di risorse è visto dal cluster
10.3. Esempio di constraint che coinvolgono i gruppi
10.4. Un esempio di risorsa clonata
10.5. Esempi di constraint che coinvolgono cloni
10.6. Esempio di variabili notifica
10.7. Monitorare entrambi gli stati di una risorsa multi-state
10.8. Esempio di constraint che coinvolge risorse multi-state
10.9. Specificare manualmente quale nodo dovrebbe essere promosso
14.1. A bare-bones status entry for a healthy node called cl-virt-1
14.2. Example set of transient node attributes for node "cl-virt-1"
14.3. Un record della risorsa apcstonith
14.4. A monitor operation (determines current state of the apcstonith resource)
14.5. Storico di una risorsa clone pingd con job multipli
H.1. Una configurazione vuota
H.2. Simple Configuration - 2 nodes, some cluster options and a resource
H.3. Advanced configuration - groups and clones with stonith