Description of problem: Clufter quotes the listen address which ends in the additional_parameters mysql resource agent option. This in turn causes the pacemaker mysql agent to quote the whole option with single quotes ('--listen-address="0.0.0.0"') for reasons unknown. This quoted argument is then passed as-is directly in the argv to mysqld binary, resulting in a weird error ([ERROR] Can't create IP socket: Success), mysqld not starting and resource failing as a consequence. Version-Release number of selected component (if applicable): clufter git-next resource-agents-3.9.5-40.el7_1.3.x86_64 How reproducible: always Steps to Reproduce: 1. either convert cluster.conf with mysql resource and listen_address set to a custom value; or manually add mysql resource to pacemaker cluster and set additional_parameters to: --listen-address="0.0.0.0" 2. start the mysql resource Actual results: mysqld fails to start (see below for more info) Expected results: Both Clufter and mysql resource agent should probably not add extra quotes where not required. Additional info: With --listen-address="0.0.0.0" (note the double quotes here and single quotes when starting the resource): <primitive class="ocf" id="my" provider="heartbeat" type="mysql"> <instance_attributes id="my-instance_attributes"> <nvpair id="my-instance_attributes-additional_parameters" name="additional_parameters" value="--bind-address="0.0.0.0""/> <nvpair id="my-instance_attributes-config" name="config" value="/etc/oh-my.cnf"/> </instance_attributes> ... </primitive> $ pcs resource debug-start my --full ... > stderr: + 17:24:30: mysql_common_start:209: /usr/bin/mysqld_safe --defaults-file=/etc/oh-my.cnf --pid-file=/var/run/mysql/mysqld.pid --socket=/var/lib/mysql/mysql.sock --datadir=/var/lib/mysql --log-error=/var/log/mysqld.log --user=mysql '--bind-address="0.0.0.0"' ... result: mysql fails to start, snippet from /var/log/mysqld.log: 150507 17:24:32 [ERROR] Can't create IP socket: Success 150507 17:24:32 [ERROR] Aborting Changing to --listen-addres=0.0.0.0 (no double quotes): <primitive class="ocf" id="my" provider="heartbeat" type="mysql"> <instance_attributes id="my-instance_attributes"> <nvpair id="my-instance_attributes-additional_parameters" name="additional_parameters" value="--bind-address=0.0.0.0"/> <nvpair id="my-instance_attributes-config" name="config" value="/etc/oh-my.cnf"/> </instance_attributes> ... </primitive> $ pcs resource debug-start my --full ... > stderr: + 17:11:20: mysql_common_start:209: /usr/bin/mysqld_safe --defaults-file=/etc/oh-my.cnf --pid-file=/var/run/mysql/mysqld.pid --socket=/var/lib/mysql/mysql.sock --datadir=/var/lib/mysql --log-error=/var/log/mysqld.log --user=mysql --bind-address=0.0.0.0 ... result: mysqld starts and listens on 0.0.0.0
Should be fixed as of upstream commit (next branch): https://github.com/jnpkrn/clufter/commit/5618410ec54e4a3c28ebfc40167a361d98ec2dad
that fix does not work, getting this error in mysqld.log: /usr/libexec/mysqld: Too many arguments (first extra is '"--bind-address=0.0.0.0"'). cluster cib contains: <nvpair id="RESOURCE-mysql-oh-my-ATTRS-additional_parameters" name="additional_parameters" value=""--bind-address=0.0.0.0" --verbose"/>
> Quotes cannot be present at all now (and "never" for backward > compatibility, even when there is "eval $cmd $arg1 $arg2"): > > http://clusterlabs.org/pipermail/users/2015-May/000403.html Should be fixed as of upstream commit (next branch): https://github.com/jnpkrn/clufter/commit/4d5478336bcf34f573f3a3090d61dc35e10ea174
OK, it was found out that in the current state of resource agents, there is little to nothing that we can do to prevent from accidental injection of unexpected parts of the command-line outside of what is an expected effect of parameter propagation (as we tried with additional quotes). Resigning and claiming this bug resolved in upstream release https://github.com/jnpkrn/clufter/releases/tag/v0.11.1 (for the time being).