OCF_HEARTBEAT_MYSQL-PROXY(7)

πŸ’… ocf_heartbeat_mysql-proxy πŸ’…

okay bestie, welcome to the OCF_HEARTBEAT_MYSQL() manual page β€” the resource is ocf_heartbeat_mysql-proxy, and it is literally giving β€œmanages a MySQL Proxy instance” main-character energy. pull up a chair, we’re going through every flag, every timeout, and every little detail together 🫢


🌸 NAME 🌸

ocf_heartbeat_mysql-proxy β€” manages a MySQL Proxy instance. that’s the whole NAME section, short and iconic ✨


✨ SYNOPSIS ✨

mysql-proxy [start | stop | monitor | meta-data | validate-all]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this script manages MySQL Proxy as an OCF resource in a high-availability setup. no cap.

The default monitor operation will verify that mysql-proxy is running. cute, simple, effective.

The level 10 monitor operation is left out intentionally for possible future enhancements in conjunction with the admin plugin. so if you’re looking for it, don’t come for me β€” it’s on purpose πŸ’…

The level 20 monitor operation will perform a SELECT on a given table to verify that the connection to a back-end server is actually working. that’s the real vibe check.

Tested with MySQL Proxy 0.8.1 and 0.8.3 on Debian 6.0. iconic time capsule behavior πŸŽ€


πŸ’– SUPPORTED PARAMETERS πŸ’–

every parameter, no skips, periodt. πŸ“

  • binary β€” full path to the MySQL Proxy binary. example: "/usr/sbin/mysql-proxy". type/default tea: optional, string, default "/usr/sbin/mysql-proxy". πŸ’–
  • client_binary β€” location of the MySQL client binary. type/default tea: optional, string, default "mysql". ✨
  • defaults_file β€” full path to a MySQL Proxy configuration file. example: "/etc/mysql-proxy.conf". type/default tea: optional, string, no default. πŸŽ€
  • proxy_backend_addresses β€” Address:port of the remote back-end servers. original says (default: 127.0.0.1:3306). type/default tea: optional, string, default "127.0.0.1:3306". πŸ¦‹
  • proxy_read_only_backend_addresses β€” Address:port of the remote (read only) unpromoted-server. original literally shows (default: ). type/default tea: optional, string, no default. 🌸
  • proxy_address β€” listening address:port of the proxy server. original says (default: :4040). you can also specify a socket like "/var/run/mysql-proxy.sock". type/default tea: optional, string, default ":4040". πŸ’…
  • log_level β€” log all messages of level (error|warning|info|message|debug|) or higher. an empty value disables logging. type/default tea: optional, string, no default. 🫢
  • keepalive β€” try to restart the proxy if it crashed. original says (default: ). valid values: true or false. an empty value equals "false". type/default tea: optional, string, no default. 😭
  • plugins β€” whitespace separated list of plugins to load. original says (default: ). note: the admin plugin will be auto-loaded in case you specify an admin_* parameter. type/default tea: optional, string, no default. πŸ”₯
  • admin_address β€” listening address:port of the admin plugin. original says (default: 127.0.0.1:4041). note: the admin plugin will be auto-loaded in case you specify an admin_* parameter. type/default tea: optional, string, default "127.0.0.1:4041". πŸ‘‘
  • admin_username β€” username for the admin plugin. original says (default: ). required since MySQL Proxy 0.8.1, if the admin plugin is loaded. note: the admin plugin will be auto-loaded in case you specify an admin_* parameter. type/default tea: optional, string, no default. 🌈
  • admin_password β€” password for the admin plugin. original says (default: ). required since MySQL Proxy 0.8.1, if the admin plugin is loaded. note: the admin plugin will be auto-loaded in case you specify an admin_* parameter. type/default tea: optional, string, no default. ⭐
  • admin_lua_script β€” script to execute by the admin plugin. required since MySQL Proxy 0.8.1, if the admin plugin is loaded. note: the admin plugin will be auto-loaded in case you specify an admin_* parameter. type/default tea: optional, string, no default. πŸ’€
  • test_table β€” table to be tested in monitor statement (in database.table notation). type/default tea: optional, string, default "mysql.user". πŸ™ˆ
  • test_user β€” MySQL test user. type/default tea: optional, string, no default. πŸ“
  • test_passwd β€” MySQL test user password. type/default tea: optional, string, no default. 🧚
  • parameters β€” the MySQL Proxy daemon may be called with additional parameters. specify any of them here. type/default tea: optional, string, no default. πŸ’œ
  • pidfile β€” PID file. type/default tea: unique, optional, string, default "/run/resource-agents/mysql-proxy-RESOURCE_ID.pid". πŸŽ€

πŸŽ€ SUPPORTED ACTIONS πŸŽ€

this resource agent supports the following actions (operations):

  • start β€” starts the resource. suggested minimum timeout: 30s. ✨
  • stop β€” stops the resource. suggested minimum timeout: 30s. πŸ’–
  • reload β€” suggested minimum timeout: 30s. πŸ¦‹
  • monitor β€” performs a detailed status check. suggested minimum timeout: 20s. suggested interval: 60s. πŸ”₯
  • validate-all β€” performs a validation of the resource configuration. suggested minimum timeout: 30s. 🌸
  • meta-data β€” retrieves resource agent metadata (internal use only). suggested minimum timeout: 5s. πŸ’…

πŸ”₯ EXAMPLE CRM SHELL πŸ”₯

the following is an example configuration for a mysql-proxy resource using the crm(8) shell:

primitive p_mysql-proxy ocf:heartbeat:mysql-proxy \
  op monitor depth="0" timeout="20s" interval="60s"

⭐ EXAMPLE PCS ⭐

the following is an example configuration for a mysql-proxy resource using pcs(8):

pcs resource create p_mysql-proxy ocf:heartbeat:mysql-proxy \
  op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="60s"

🌈 SEE ALSO 🌈

the link drop: http://clusterlabs.org/ 🫢


πŸ‘‘ AUTHOR πŸ‘‘

ClusterLabs contributors (see the resource agent source for information about individual authors). πŸ‘‘


that’s the whole vibe β€” footer/source-version marker is OCF_HEARTBEAT_MYSQL(), and this page doesn’t print a date, so no timestamp tea here, bestie. mwah πŸ’‹

πŸ“¦ where this page comes from