Bug 1288590 - Errors in mariadb templates prevent the creation of mariadb instances
Errors in mariadb templates prevent the creation of mariadb instances
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-trove (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
high Severity high
: ga
: 8.0 (Liberty)
Assigned To: Victoria Martinez de la Cruz
Luigi Toscano
: TestOnly, ZStream
Depends On:
Blocks: 1289365
  Show dependency treegraph
Reported: 2015-12-04 11:44 EST by Luigi Toscano
Modified: 2016-04-15 09:46 EDT (History)
8 users (show)

See Also:
Fixed In Version: openstack-trove-4.0.0-4.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-04-15 09:46:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Luigi Toscano 2015-12-04 11:44:20 EST
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

Errors found:

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 )

!includedir /etc/my.conf.d/
-> 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):

How reproducible:

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

Actual results:
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.

Expected results:
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.
Comment 1 Luigi Toscano 2015-12-04 11:54:00 EST
Small correction: the templates need to be fixed in the control plane, as they are sent from there to the instance.
Comment 2 Pete MacKinnon 2015-12-10 13:25:32 EST

/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.
Comment 3 Pete MacKinnon 2015-12-10 14:57:38 EST
https://bugs.launchpad.net/trove/+bug/1370646 might be a reason NOT to do what's in #c2
Comment 16 Luigi Toscano 2016-04-11 18:25:22 EDT
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.

Verified on:
Comment 18 errata-xmlrpc 2016-04-15 09:46:27 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.