Comment 5 for bug 1634562

Revision history for this message
Andrew Garner (abg) wrote :

I was able to reproduce this in a multi-node environment, where the initial SST takes longer than in an AIO environment.

In my environment, initial SST for the 2nd and 3rd Galera instances takes about 50 seconds. The MariaDB initscript defaults to a 30 second timeout.

On Ubuntu 16.04, the initscript is started through an isolated systemd environment (via ansible service module -> systemctl start mysql). This ignores the MYSQLD_STARTUP_TIMEOUT environment variable set in the "Restart mysql" handler. Further, on systemd platforms /etc/default/mysql is not generated by the galera_server role, so the default 30s timeout ends up being used.

Changing "delay" helps avoid this because it gives enough time for the service to startup - so one of the following retries of "/etc/init.d/mysql" is effectively a noop and succeeds as mysqld is already online.

Just dropping the file /etc/default/mysql on ubuntu 16.04 seems to work for me to make startup reliable. That is (among other options), just deleting this one line seems to work:

https://github.com/openstack/openstack-ansible-galera_server/blob/2b610bac6559a30f31670b2330b7c65a721f9bbd/tasks/galera_post_install.yml#L93