rcbops-cookbooks/mysql-openstack — pull request #47 by mancdaz (2013-07-26 12:42:21+00:00)
Title: do not enable binlogging whilst install is still happening

By setting an attribute for node['mysql']['tunable'][''log_bin', we make the
mysql recipe drop in configuration that enables binlogging from
the start. Sometimes there is a race condition wherby the config file gets dropped
in, and mysql is restarted, before the mysql_install_db script has finished. This causes
some of the setup statements (create mysql database, performance_schema
database etc) to be passed into the binlog. This is BAD, since when
replication starts from a second node, it tries to run these statements
against itself - it has already run these statements as part of it's own
install, and chaos and death ensues.

Due to the way chef does not allow you to modify an attribute part way
through a recipe, we are going to have to enable binlogging in a
slightly different way - by dropping a conf.d config file just for
binlogging, later on, at a time that is under our control.