OCF_HEARTBEAT_GALERA(7)

πŸ’œ ocf_heartbeat_galera β€” bestie's guide to the Galera resource agent

okay so real talk: this is page OCF_HEARTBEAT_GALERA(7) from the OCF resource agents manual collection, and it's literally the whole lore on ocf_heartbeat_galera. grab a boba, we're getting into it πŸ§‹βœ¨


🌸 NAME 🌸

ocf_heartbeat_galera β€” she manages a galera instance. that's the whole job. no cap. πŸ’…


✨ SYNOPSIS ✨

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

πŸ¦‹ DESCRIPTION πŸ¦‹

it's a resource script for managing your galera database. iconic behavior, honestly. πŸ‘‘


πŸŽ€ SUPPORTED PARAMETERS πŸŽ€

these are the knobs, bestie. every single one. let's go down the list 🫢

  • binary β€” where your MySQL server binary lives. (optional, string, no default)
  • client_binary β€” where your MySQL client binary lives. (optional, string, no default)
  • config β€” the config file, yeah? (optional, string, no default)
  • datadir β€” the directory that's holding all your databases. (optional, string, no default)
  • user β€” the user running the MySQL daemon. (optional, string, no default)
  • group β€” the group running the MySQL daemon (this one handles logfile and directory permissions). (optional, string, no default)
  • log β€” the logfile mysqld should use. (optional, string, no default)
  • pid β€” the pidfile mysqld should use. (optional, string, no default)
  • socket β€” the socket mysqld should use. (optional, string, no default)
  • enable_creation β€” if the MySQL database doesn't exist yet, it gets created. poof, there it is ✨ (optional, boolean, default false)
  • additional_parameters β€” extra params that get passed to mysqld on startup (like --skip-external-locking or --skip-grant-tables). (optional, string, no default)
  • wsrep_cluster_address β€” the galera cluster address, and it takes this form:
gcomm://node,node,node

only the nodes listed here are allowed to start a galera instance β€” like a VIP list, but make it database 🎟️. the galera node names in this address are expected to match valid pacemaker node names. and if the two names need to differ, you must provide a mapping in the option cluster_host_map. (required, string, no default)

  • cluster_host_map β€” a mapping of pacemaker node names to galera node names πŸ”

use this when pacemaker names and galera names need to differ (e.g. when the galera names map to an IP from a specific network interface). it takes this form:

pcmk1:node.1.galera;pcmk2:node.2.galera;pcmk3:node.3.galera

where the galera resource started on node pcmk1 would be named node.1.galera in the wsrep_cluster_address. (optional, string, no default)

  • check_user β€” the cluster check user. (optional, string, no default)
  • check_passwd β€” the cluster check user's password. empty passwords get ignored unless the parameter "check_passwd_use_empty" is set to 1. (optional, string, no default)
  • check_passwd_use_empty β€” use an empty "check_passwd" password. if this is set to 1, then "check_passwd" is ignored and an empty password is used when calling the "mysql" client binary. (optional, boolean, default 0)
  • two_node_mode β€” if you're running in a 2-node pacemaker cluster, this leans on pacemaker quorum so you get automatic recovery even when the other node is unreachable. ⚠️ use it with caution! (and fencing, bestie, fencing) (optional, boolean, default false)

⭐ SUPPORTED ACTIONS ⭐

this resource agent supports these actions (operations for the uninitiated). each one comes with a suggested minimum timeout, and two of them want an interval too:

  • start β€” starts the resource. suggested minimum timeout: 120s.
  • stop β€” stops the resource. suggested minimum timeout: 120s.
  • status β€” performs a status check. suggested minimum timeout: 60s.
  • monitor β€” performs a detailed status check. suggested minimum timeout: 30s. suggested interval: 20s.
  • monitor (Promoted role) β€” performs a detailed status check, but for the promoted role. suggested minimum timeout: 30s. suggested interval: 10s.
  • promote β€” promotes the resource to the Master role. πŸ‘‘ suggested minimum timeout: 300s.
  • demote β€” demotes the resource to the Slave role. suggested minimum timeout: 120s.
  • validate-all β€” performs a validation of the resource configuration. suggested minimum timeout: 5s.
  • meta-data β€” retrieves resource agent metadata (internal use only, don't touch πŸ™ˆ). suggested minimum timeout: 5s.

🌈 EXAMPLE CRM SHELL 🌈

here's what a galera resource config looks like using the crm(8) shell β€” copy/paste energy, iykyk:

primitive p_galera ocf:heartbeat:galera \
  params \
    wsrep_cluster_address=string \
  op monitor depth="0" timeout="30s" interval="20s" \
  op monitor role="Promoted" depth="0" timeout="30s" interval="10s"

ms ms_galera p_galera \
  meta notify="true" interleave="true"

πŸ“ EXAMPLE PCS πŸ“

and here's the same vibe via pcs(8):

pcs resource create p_galera ocf:heartbeat:galera \
  wsrep_cluster_address=string \
  op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="20s" \
  op monitor role="Promoted" OCF_CHECK_LEVEL="0" timeout="30s" interval="10s" promotable

πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

ClusterLabs contributors (see the resource agent source for information about individual authors). honestly? legends, all of them. 🫢


okay that's the whole page, you ate that πŸ’…βœ¨ this was resource-agents version UNKNOWN, dated 10/01/2026, served fresh from the OCF_HEARTBEAT_GALERA(7) girlies. go forth and cluster, bestie πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from