ocf_heartbeat_galera man page

ocf_heartbeat_galera — Manages a galara instance

Synopsis

galera [start | stop | status | monitor | promote | demote | meta-data | validate-all]

Description

Resource script for managing galara database.

Supported Parameters

binary

Location of the MySQL server binary

(optional, string, default "/usr/bin/safe_mysqld")

client_binary

Location of the MySQL client binary

(optional, string, default "mysql")

config

Configuration file

(optional, string, default "/etc/my.cnf")

datadir

Directory containing databases

(optional, string, default "/var/lib/mysql")

user

User running MySQL daemon

(optional, string, default "mysql")

group

Group running MySQL daemon (for logfile and directory permissions)

(optional, string, default "mysql")

log

The logfile to be used for mysqld.

(optional, string, default "/var/log/mysqld.log")

pid

The pidfile to be used for mysqld.

(optional, string, default "/var/run/mysql/mysqld.pid")

socket

The socket to be used for mysqld.

(optional, string, default "/var/lib/mysql/mysql.sock")

enable_creation

If the MySQL database does not exist, it will be created

(optional, boolean, default 0)

additional_parameters

Additional parameters which are passed to the mysqld on startup. (e.g. --skip-external-locking or --skip-grant-tables)

(optional, string, no default)

wsrep_cluster_address

The galera cluster address. This takes the form of: gcomm://node,node,node

Only nodes present in this node list will be allowed to start a galera instance. It is expected that the galera node names listed in this address match valid pacemaker node names.

(required, string, no default)

check_user

Cluster check user.

(optional, string, default "root")

check_passwd

Cluster check user password

(optional, string, no default)

Supported Actions

This resource agent supports the following actions (operations):

start

Starts the resource. Suggested minimum timeout: 120.

stop

Stops the resource. Suggested minimum timeout: 120.

status

Performs a status check. Suggested minimum timeout: 60.

monitor

Performs a detailed status check. Suggested minimum timeout: 30. Suggested interval: 20.

monitor (Master role)

Performs a detailed status check. Suggested minimum timeout: 30. Suggested interval: 10.

monitor (Slave role)

Performs a detailed status check. Suggested minimum timeout: 30. Suggested interval: 30.

promote

Promotes the resource to the Master role. Suggested minimum timeout: 300.

demote

Demotes the resource to the Slave role. Suggested minimum timeout: 120.

validate-all

Performs a validation of the resource configuration. Suggested minimum timeout: 5.

meta-data

Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5.

Example Crm Shell

The following is an example configuration for a galera resource using the crm(8) shell:

primitive p_galera ocf:heartbeat:galera \
  params \
    wsrep_cluster_address=string \
  op monitor depth="0" timeout="30" interval="20" \
  op monitor role="Master" depth="0" timeout="30" interval="10" \
  op monitor role="Slave" depth="0" timeout="30" interval="30"
ms ms_galera p_galera \
  meta notify="true" interleave="true"

Example Pcs

The following is an example configuration for a galera resource using pcs(8)

pcs resource create p_galera ocf:heartbeat:galera \
  wsrep_cluster_address=string \
  op monitor depth="0" timeout="30" interval="20" \
  op monitor role="Master" depth="0" timeout="30" interval="10" \
  op monitor role="Slave" depth="0" timeout="30" interval="30" --master

See Also

http://www.linux-ha.org/wiki/galera_(re…

Author

Linux-HA contributors (see the resource agent source for information about individual authors)

Info

02/09/2016 resource-agents UNKNOWN OCF resource agents