Bug 1288590 - Errors in mariadb templates prevent the creation of mariadb instances
Summary: Errors in mariadb templates prevent the creation of mariadb instances
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-trove
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ga
: 8.0 (Liberty)
Assignee: Victoria Martinez de la Cruz
QA Contact: Luigi Toscano
URL:
Whiteboard:
Depends On:
Blocks: 1289365
TreeView+ depends on / blocked
 
Reported: 2015-12-04 16:44 UTC by Luigi Toscano
Modified: 2016-04-15 13:46 UTC (History)
8 users (show)

Fixed In Version: openstack-trove-4.0.0-4.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-15 13:46:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0636 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 8 release candidate Bugfix Advisory 2016-04-15 17:45:07 UTC

Description Luigi Toscano 2015-12-04 16:44:20 UTC
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):
openstack-trove-common-4.0.0-2.el7ost.noarch
openstack-trove-guestagent-4.0.0-2.el7ost.noarch
python-trove-4.0.0-2.el7ost.noarch


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 16:54:00 UTC
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 18:25:32 UTC
Also,

/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 19:57:38 UTC
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 22:25:22 UTC
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:
openstack-trove-4.0.0-4.el7ost.noarch
openstack-trove-api-4.0.0-4.el7ost.noarch
openstack-trove-common-4.0.0-4.el7ost.noarch
openstack-trove-conductor-4.0.0-4.el7ost.noarch
openstack-trove-images-4.0.0-4.el7ost.noarch
openstack-trove-taskmanager-4.0.0-4.el7ost.noarch
python-trove-4.0.0-4.el7ost.noarch

Comment 18 errata-xmlrpc 2016-04-15 13:46:27 UTC
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.

https://rhn.redhat.com/errata/RHBA-2016-0636.html


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