1OCF_HEARTBEAT_MYSQL() OCF_HEARTBEAT_MYSQL()
2
3
4
6 ocf_heartbeat_mysql-proxy - Manages a MySQL Proxy instance
7
9 mysql-proxy [start | stop | monitor | meta-data | validate-all]
10
12 This script manages MySQL Proxy as an OCF resource in a
13 high-availability setup.
14
15 The default monitor operation will verify that mysql-proxy is running.
16
17 The level 10 monitor operation is left out intentionally for possible
18 future enhancements in conjunction with the admin plugin.
19
20 The level 20 monitor operation will perform a SELECT on a given table
21 to verify that the connection to a back-end server is actually working.
22
23 Tested with MySQL Proxy 0.8.1 and 0.8.3 on Debian 6.0.
24
26 binary
27 Full path to the MySQL Proxy binary. For example,
28 "/usr/sbin/mysql-proxy".
29
30 (optional, string, default "/usr/sbin/mysql-proxy")
31
32 client_binary
33 Location of the MySQL client binary.
34
35 (optional, string, default "mysql")
36
37 defaults_file
38 Full path to a MySQL Proxy configuration file. For example,
39 "/etc/mysql-proxy.conf".
40
41 (optional, string, no default)
42
43 proxy_backend_addresses
44 Address:port of the remote back-end servers (default:
45 127.0.0.1:3306).
46
47 (optional, string, default "127.0.0.1:3306")
48
49 proxy_read_only_backend_addresses
50 Address:port of the remote (read only) unpromoted-server (default:
51 ).
52
53 (optional, string, no default)
54
55 proxy_address
56 Listening address:port of the proxy server (default: :4040). You
57 can also specify a socket like "/var/run/mysql-proxy.sock".
58
59 (optional, string, default ":4040")
60
61 log_level
62 Log all messages of level (error|warning|info|message|debug|) or
63 higher. An empty value disables logging.
64
65 (optional, string, no default)
66
67 keepalive
68 Try to restart the proxy if it crashed (default: ). Valid values:
69 true or false. An empty value equals "false".
70
71 (optional, string, no default)
72
73 plugins
74 Whitespace separated list of plugins to load (default: ). Note: The
75 admin plugin will be auto-loaded in case you specify an admin_*
76 parameter.
77
78 (optional, string, no default)
79
80 admin_address
81 Listening address:port of the admin plugin (default:
82 127.0.0.1:4041). Note: The admin plugin will be auto-loaded in case
83 you specify an admin_* parameter.
84
85 (optional, string, default "127.0.0.1:4041")
86
87 admin_username
88 Username for the admin plugin (default: ). Required since MySQL
89 Proxy 0.8.1, if the admin plugin is loaded. Note: The admin plugin
90 will be auto-loaded in case you specify an admin_* parameter.
91
92 (optional, string, no default)
93
94 admin_password
95 Password for the admin plugin (default: ). Required since MySQL
96 Proxy 0.8.1, if the admin plugin is loaded. Note: The admin plugin
97 will be auto-loaded in case you specify an admin_* parameter.
98
99 (optional, string, no default)
100
101 admin_lua_script
102 Script to execute by the admin plugin. Required since MySQL Proxy
103 0.8.1, if the admin plugin is loaded. Note: The admin plugin will
104 be auto-loaded in case you specify an admin_* parameter.
105
106 (optional, string, no default)
107
108 test_table
109 Table to be tested in monitor statement (in database.table
110 notation)
111
112 (optional, string, default "mysql.user")
113
114 test_user
115 MySQL test user
116
117 (optional, string, no default)
118
119 test_passwd
120 MySQL test user password
121
122 (optional, string, no default)
123
124 parameters
125 The MySQL Proxy daemon may be called with additional parameters.
126 Specify any of them here.
127
128 (optional, string, no default)
129
130 pidfile
131 PID file
132
133 (unique, optional, string, default
134 "/run/resource-agents/mysql-proxy-RESOURCE_ID.pid")
135
137 This resource agent supports the following actions (operations):
138
139 start
140 Starts the resource. Suggested minimum timeout: 30s.
141
142 stop
143 Stops the resource. Suggested minimum timeout: 30s.
144
145 reload
146 Suggested minimum timeout: 30s.
147
148 monitor
149 Performs a detailed status check. Suggested minimum timeout: 20s.
150 Suggested interval: 60s.
151
152 validate-all
153 Performs a validation of the resource configuration. Suggested
154 minimum timeout: 30s.
155
156 meta-data
157 Retrieves resource agent metadata (internal use only). Suggested
158 minimum timeout: 5s.
159
161 The following is an example configuration for a mysql-proxy resource
162 using the crm(8) shell:
163
164 primitive p_mysql-proxy ocf:heartbeat:mysql-proxy \
165 op monitor depth="0" timeout="20s" interval="60s"
166
168 The following is an example configuration for a mysql-proxy resource
169 using pcs(8)
170
171 pcs resource create p_mysql-proxy ocf:heartbeat:mysql-proxy \
172 op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="60s"
173
175 http://clusterlabs.org/
176
178 ClusterLabs contributors (see the resource agent source for information
179 about individual authors)
180
181
182
183 OCF_HEARTBEAT_MYSQL()