Hide Forgot
Description of problem: The "mysql" heartbeat resource (/usr/lib/ocf/resource.d/heartbeat/mysql) seems to generally work. E.g. '/usr/lib/ocf/resource.d/heartbeat/mysql start' will start an instance of MariaDB. However it does that by running 'mysqld_safe' directly and not through calling the mariadb service. Version-Release number of selected component (if applicable): 3.9.5-54.el7_2.17 How reproducible: Consistent. Steps to Reproduce: Create a service. From that service, run: /usr/lib/ocf/resource.d/heartbeat/mysql stop /usr/lib/ocf/resource.d/heartbeat/mysql start (Or similar manipulations) Actual results: An instance of MariaDB running in the same cgroup of your service, regardless of the mariadb service. Expected results: The MariaDB service stopped and started. Additional info: My initial workaround (currently in a copy of that script, due to packaging concerns, but really belongs in /usr/lib/ocf/lib/heartbeat/mysql-common.sh) is: # Redefine functions from mysql-common.sh: mysql_common_start() { systemctl start mariadb } mysql_common_stop() { systemctl stop mariadb } mysql_common_status() { local loglevel=$1 if systemctl is-active --quiet mariadb; then return $OCF_SUCCESS; else ocf_log $loglevel "MySQL not running" return $OCF_NOT_RUNNING; fi }
Closing as this change would require a full rewrite of the configuration parsing, which in turn might not be backwards compatible either.