mariadb rhel7 service

Bug #1371750 reported by Kevin Fox
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Wishlist
Victoria Martinez de la Cruz

Bug Description

when using mariadb-server with guestagent is running within sl7 python 2.7 on x86_64 and trunk:

guestagent/datastore/mysql/service.py:660

Fails to find the mysql service. its called 'mariadb' on this platform, not mysql*

Revision history for this message
Kevin Fox (kevpn) wrote :

also,

MYSQL_CONFIG = /etc/my.cnf
and the confid.d is /etc/my.cnf.d no /etc/mysql/ exists.

This will probably will affect the config template that needs passed in too.

Revision history for this message
Kevin Fox (kevpn) wrote :

Yeah, so I got trove + rhel7 guest working by updating the heat template to patch the guest agent thusly:
              "sed -i 's/\\(MYSQL_SERVICE_CANDIDATES = \\[\\)/\\1\"mariadb\",/' /usr/lib/python2.7/site-packages/trove/guestagent/datastore/mysql/service.py\n",
              "sed -i 's@etc/mysql/conf.d@etc/my.cnf.d@' /usr/lib/python2.7/site-packages/trove/guestagent/datastore/mysql/service.py\n",
              "sed -i 's@etc/mysql/my.cnf@etc/my.cnf@' /usr/lib/python2.7/site-packages/trove/guestagent/datastore/mysql/service.py\n",

The first one will always work. The latter two need to be fixed in the code to detect which distro its on, and conditionally set their values to that. But for now, this workaround works.

And on the server:
/usr/lib/python2.7/site-packages/trove/templates/mysql/config.template
changing:
pid_file = /var/run/mariadb/mysqld.pid

And setting includedir to:
!includedir /etc/my.cnf.d/

The first option may be able to be made to the datastore version? But I don't think the latter option can.

Revision history for this message
Auston McReynolds (amcrn) wrote :

can you file a blueprint for this? as of now, only percona + mysql are documented as supported, whereas mariadb is not.

Revision history for this message
Kevin Fox (kevpn) wrote :

Looks like there is an existing blueprint. I added a link to this bug report to the whiteboard of the blueprint.
https://blueprints.launchpad.net/trove/+spec/support-mariadb-database-by-trove

Revision history for this message
SnowDust (nilakhya-chatterjee) wrote :

Hi Kevin, Auston

The blueprint is still unimplemented as there is a needed clarity if we want to host "Mariadb" as a fully isolated entity or treat it like "mysql- like" database.

The discussion earlier had no clarity and it will be great if we define the path to implement the blueprint and even take out confusions, where no one has to fork its implementation.

Thanks

Revision history for this message
Denis M. (dmakogon) wrote :

As for me, this bug report is invalid. With the respect to https://wiki.openstack.org/wiki/Trove/DatastoreCompatibilityMatrix - Trove doesn't support MariaDB.

After certain considerations and researching i faced with next things:
1. MariaDB is mysql-like datastore from Trove perspective.
2. MariaDB is not like a MySQL in general.
3. With taking into account #1 and #2 i must say that Trove should have separate manager for MariaDB.

From testing perspective:

MariaDB can be easily deployed over Fedora/RHEL/CentOS/OEL/OEVM but not the Ubuntu (any of releases, even taking into account huge amount of hacks while deployment).

For those developers who are on the track of MariaDB support might write appropriate spec for adding separate manager(as Auston said) for MariaDB, and nothing else.

Changed in trove:
status: New → Invalid
Revision history for this message
Amrith Kumar (amrith) wrote :

Kevin Fox, please file a blueprint or if there is a prior blueprint, would you please revise it and resubmit.

I wonder what makes Denis believe that MariaDB is not like MySQL in general. I'm sure that Monty (Widenius) would beg to differ.

Changed in trove:
status: Invalid → Incomplete
Revision history for this message
Denis M. (dmakogon) wrote :

Amrith,
I meant that:

MariaDB is not MySQL-like datastore from Trove perspective, because manager for MariaDB requires tweaking base mysql manager. Let's take a look at Datastore definition:
        Datastore is an entity that represents a set of Datastore Versions, identified by certain attributes(see model definition)
        Datastore Version is an entity that represents specific version of concrete distribution.

But MariaDB is not a different version of mysql that's supported by Trove. In terms of Datastore and Datastore versions - MariaDB is another flavor of mysql(such as Percona). So, it requires different manager. Completely disagree on making base mysql manager hybrid to fit all possible MySQL-like databases. Eventually we would end up with something that doesn't work.

MariaDB is MySQL-like database, in common theory, but not for Trove.

Revision history for this message
Kevin Fox (kevpn) wrote :

I think the blueprint here is the correct one:
https://blueprints.launchpad.net/trove/+spec/support-mariadb-database-by-trove

My two cents are that the Percona/MariaDB/MySQL drivers will share almost 99% or more code. Perhaps the best thing to do would be make a base MySQLBase driver object that is basically the existing MySQL driver and have Percona/MariaDB/MySQL drivers inherit from that base class, and override the few things they actually do differently.

As a user, I don't really care if I have to select MariaDB either through selecting the MySQL driver or the MariaDB driver. Though the latter does seem slightly cleaner. All I know is if I want MySQL on RHEL7, I have easy access to MariaDB, not MySQL. I just want to use what the vendor provided. The lack of support is a problem.

The bug report is 'invalid' as Denis pointed out, but it is at least useful to document what I had to do to make it work, which should help with whomever is writing the MariaDB driver.

Changed in trove:
importance: Undecided → Wishlist
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Trove because there has been no activity for 60 days.]

Changed in trove:
status: Incomplete → Expired
Revision history for this message
Kevin Fox (kevpn) wrote :

hey, look at that. I just ran in to this problem again... another SL7 RDO juno based cloud. Trove doesn't support SL7's (/RHEL7's) supported version of mysql, aka mariadb. Still a bug. :/

Changed in trove:
status: Expired → Confirmed
Revision history for this message
Amrith Kumar (amrith) wrote :

Victoria, you marked this as confirmed for SL7/RDO. Trove supports MariaDB, this is (IMHO) something in RDO? If yes, please mark this bug appropriately.

Changed in trove:
assignee: nobody → Victoria Martinez de la Cruz (vkmc)
status: Confirmed → Incomplete
Revision history for this message
Luigi Toscano (ltoscano) wrote :

This was one year ago, before the big mysql datastore refactoring:
http://specs.openstack.org/openstack/trove-specs/specs/liberty/mysql-manager-refactor.html
and mariadb proper support
https://blueprints.launchpad.net/trove/+spec/mariadb-datastore-support
which both landed in Liberty. So more than Incomplete, this is a resolved bug IMHO.

Revision history for this message
Victoria Martinez de la Cruz (vkmc) wrote :

This is no longer a bug. As Luigi pointed out, this has been fixed after the MySQL-based datastores refactoring and the MariaDB driver implementation. Marking this as Invalid.

Changed in trove:
status: Incomplete → Invalid
assignee: Victoria Martinez de la Cruz (vkmc) → nobody
Changed in trove:
status: Invalid → Fix Released
Revision history for this message
Victoria Martinez de la Cruz (vkmc) wrote :

Seems more accurate to mark it as released. MariaDB support is available since Liberty.

Changed in trove:
assignee: nobody → Victoria Martinez de la Cruz (vkmc)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.