'\" t .\" Title: ocf_heartbeat_galera .\" Author: ClusterLabs contributors (see the resource agent source for information about individual authors) .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 12/17/2020 .\" Manual: OCF resource agents .\" Source: resource-agents UNKNOWN .\" Language: English .\" .TH "OCF_HEARTBEAT_GALERA" "7" "12/17/2020" "resource-agents UNKNOWN" "OCF resource agents" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ocf_heartbeat_galera \- Manages a galera instance .SH "SYNOPSIS" .HP \w'\fBgalera\fR\ 'u \fBgalera\fR [start | stop | status | monitor | promote | demote | meta\-data | validate\-all] .SH "DESCRIPTION" .PP Resource script for managing galera database\&. .SH "SUPPORTED PARAMETERS" .PP \fBbinary\fR .RS 4 Location of the MySQL server binary .sp (optional, string, no default) .RE .PP \fBclient_binary\fR .RS 4 Location of the MySQL client binary .sp (optional, string, no default) .RE .PP \fBconfig\fR .RS 4 Configuration file .sp (optional, string, no default) .RE .PP \fBdatadir\fR .RS 4 Directory containing databases .sp (optional, string, no default) .RE .PP \fBuser\fR .RS 4 User running MySQL daemon .sp (optional, string, no default) .RE .PP \fBgroup\fR .RS 4 Group running MySQL daemon (for logfile and directory permissions) .sp (optional, string, no default) .RE .PP \fBlog\fR .RS 4 The logfile to be used for mysqld\&. .sp (optional, string, no default) .RE .PP \fBpid\fR .RS 4 The pidfile to be used for mysqld\&. .sp (optional, string, no default) .RE .PP \fBsocket\fR .RS 4 The socket to be used for mysqld\&. .sp (optional, string, no default) .RE .PP \fBenable_creation\fR .RS 4 If the MySQL database does not exist, it will be created .sp (optional, boolean, default false) .RE .PP \fBadditional_parameters\fR .RS 4 Additional parameters which are passed to the mysqld on startup\&. (e\&.g\&. \-\-skip\-external\-locking or \-\-skip\-grant\-tables) .sp (optional, string, no default) .RE .PP \fBwsrep_cluster_address\fR .RS 4 The galera cluster address\&. This takes the form of: gcomm://node,node,node .sp Only nodes present in this node list will be allowed to start a galera instance\&. The galera node names listed in this address are expected to match valid pacemaker node names\&. If both names need to differ, you must provide a mapping in option cluster_host_map\&. .sp (required, string, no default) .RE .PP \fBcluster_host_map\fR .RS 4 A mapping of pacemaker node names to galera node names\&. .sp To be used when both pacemaker and galera names need to differ, (e\&.g\&. when galera names map to IP from a specific network interface) This takes the form of: pcmk1:node\&.1\&.galera;pcmk2:node\&.2\&.galera;pcmk3:node\&.3\&.galera .sp where the galera resource started on node pcmk1 would be named node\&.1\&.galera in the wsrep_cluster_address .sp (optional, string, no default) .RE .PP \fBcheck_user\fR .RS 4 Cluster check user\&. .sp (optional, string, no default) .RE .PP \fBcheck_passwd\fR .RS 4 Cluster check user password\&. Empty passwords are ignored unless the parameter "check_passwd_use_empty" is set to 1\&. .sp (optional, string, no default) .RE .PP \fBcheck_passwd_use_empty\fR .RS 4 Use an empty "check_passwd" password\&. If this parameter is set to 1, "check_passwd" will be ignored and an empty password is used when calling the "mysql" client binary\&. .sp (optional, boolean, default 0) .RE .PP \fBtwo_node_mode\fR .RS 4 If running in a 2\-node pacemaker cluster, rely on pacemaker quorum to allow automatic recovery even when the other node is unreachable\&. Use it with caution! (and fencing) .sp (optional, boolean, default false) .RE .SH "SUPPORTED ACTIONS" .PP This resource agent supports the following actions (operations): .PP \fBstart\fR .RS 4 Starts the resource\&. Suggested minimum timeout: 120s\&. .RE .PP \fBstop\fR .RS 4 Stops the resource\&. Suggested minimum timeout: 120s\&. .RE .PP \fBstatus\fR .RS 4 Performs a status check\&. Suggested minimum timeout: 60s\&. .RE .PP \fBmonitor\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 30s\&. Suggested interval: 20s\&. .RE .PP \fBmonitor (Master role)\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 30s\&. Suggested interval: 10s\&. .RE .PP \fBmonitor (Slave role)\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 30s\&. Suggested interval: 30s\&. .RE .PP \fBpromote\fR .RS 4 Promotes the resource to the Master role\&. Suggested minimum timeout: 300s\&. .RE .PP \fBdemote\fR .RS 4 Demotes the resource to the Slave role\&. Suggested minimum timeout: 120s\&. .RE .PP \fBvalidate\-all\fR .RS 4 Performs a validation of the resource configuration\&. Suggested minimum timeout: 5s\&. .RE .PP \fBmeta\-data\fR .RS 4 Retrieves resource agent metadata (internal use only)\&. Suggested minimum timeout: 5s\&. .RE .SH "EXAMPLE CRM SHELL" .PP The following is an example configuration for a galera resource using the \fBcrm\fR(8) shell: .sp .if n \{\ .RS 4 .\} .nf primitive p_galera ocf:heartbeat:galera \e params \e wsrep_cluster_address=\fIstring\fR \e op monitor depth="0" timeout="30s" interval="20s" \e op monitor role="Master" depth="0" timeout="30s" interval="10s" \e op monitor role="Slave" depth="0" timeout="30s" interval="30s" .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf ms ms_galera p_galera \e meta notify="true" interleave="true" .fi .if n \{\ .RE .\} .SH "EXAMPLE PCS" .PP The following is an example configuration for a galera resource using \fBpcs\fR(8) .sp .if n \{\ .RS 4 .\} .nf pcs resource create p_galera ocf:heartbeat:galera \e wsrep_cluster_address=\fIstring\fR \e op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="20s" \e op monitor role="Master" OCF_CHECK_LEVEL="0" timeout="30s" interval="10s" \e op monitor role="Slave" OCF_CHECK_LEVEL="0" timeout="30s" interval="30s" promotable .fi .if n \{\ .RE .\} .SH "SEE ALSO" .PP \m[blue]\fB\%http://clusterlabs.org/\fR\m[] .SH "AUTHOR" .PP \fBClusterLabs contributors (see the resource agent source for information about individual authors)\fR