Red Hat Bugzilla – Bug 1288590
Errors in mariadb templates prevent the creation of mariadb instances
Last modified: 2016-04-15 09:46:27 EDT
Description of problem:
When a guest instance based on mariadb 5.5 (the default one shipped with RHEL) is started, the default configuration coming from the mariadb template contains two errors which prevent mariadb from starting.
The template file is: trove/templates/mariadb/config.template
pid_file = /var/run/mysqld/mysqld.pid
-> the directory /var/run/mysqld is not provided by mariadb-server-5.5.44-2.el7.x86_64 (it is provided by mariadb-galera-server-5.5.42-1.el7ost.x86_64 though). The temporary directory should be /var/run/maridb/ (so probably the default is a good choice, /var/run/mariadb/mariadb.pid )
-> the directory does not exist with both mariadb-server 5.5 and mariadb-galera-server 5.5; it should be /etc/my.cnf.d
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Define a mariadb 5.5 datastore, with an associated instance with mariadb-server package preloaded (in addition to the guest agent, of course).
2. Create an trove instance based on mariadb 5.5
The instance move to SHUTDOWN and the mariadb server can't start; the reported errors include:
Initialization of MySQL database failed.
Perhaps /etc/my.cnf is misconfigured.
Instance in ACTIVE state.
Instances moves to ACTIVE state if the two parameters are fixes as described above in the templates included with the image.
Small correction: the templates need to be fixed in the control plane, as they are sent from there to the instance.
/usr/lib/python2.7/site-packages/trove/templates/mysql/config.template has a datadir entry of /var/lib/mysql/data
This is incompatible with the mysql 5.6 community RPM in that their systemd file is tuned to work with /var/lib/mysql. Using the upstream default can cause all manner of strange failures in the prepare phase like: "Access denied for user 'os_admin'@'localhost'"
However, the upstream setting does seem compatible with the mariadb vendor RPMs. But those use init.d scripts which appear more resilient to the difference.
https://bugs.launchpad.net/trove/+bug/1370646 might be a reason NOT to do what's in #c2
The templates have been fixed, so that RHEL7.2-based mariadb instances can be created, namely mariadb 5.5 from RHEL repositories and mariadb 10 from community repositories.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.