Bug 1293622

Summary: Use upstream MYSQL_BIN_CANDIDATES for '--print-defaults'
Product: Red Hat OpenStack Reporter: Pete MacKinnon <pmackinn>
Component: openstack-troveAssignee: Victoria Martinez de la Cruz <vimartin>
Status: CLOSED CURRENTRELEASE QA Contact: Luigi Toscano <ltoscano>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 8.0 (Liberty)CC: apevec, jschluet, lhh, ltoscano, nbarcet, sgotliv, srevivo, vimartin
Target Milestone: ---Keywords: ZStream
Target Release: 8.0 (Liberty)   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-29 20:39:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1289365    

Description Pete MacKinnon 2015-12-22 13:00:52 UTC
trove/guestagent/datastore/mysql/service_base.py (liberty)

A recent change made the value:
MYSQL_BIN_CANDIDATES = ["/usr/bin/mysqld_safe"]

However, it is very important that this be reverted to the upstream values:
MYSQL_BIN_CANDIDATES = ["/usr/sbin/mysqld", "/usr/libexec/mysqld"]

These are the native executables of mysqld itself for mysql community and mariadb respectively. These are used with the option '--print-defaults' by the load_mysqld_options method to finally determine the db status based on the pid file existence (or lack thereof).

'--print-defaults' is understood directly by both of the native mysqld executables. However, mysqld_safe is a service wrapper shell script that folds in command line args for the daemon launch by parsing config. '--print-defaults' would be understood by it but only if it is virtually the first arg computed, which never seems to occur within mysqld_safe. Thus, mysqld_safe is not the correct nor reliable target for MYSQL_BIN_CANDIDATES.

Currently, we see errors in the host*.err files for mysqld from the prepare phase with lines like:

151221 10:41:13 [ERROR] /usr/libexec/mysqld: unknown option '--print-defaults'
151221 10:41:13 [ERROR] Aborting
151221 10:41:13  InnoDB: Starting shutdown...
151221 10:41:14  InnoDB: Shutdown completed; log sequence number 1597945
151221 10:41:14 [Note] /usr/libexec/mysqld: Shutdown complete

It is entirely likely that the current use of mysqld_safe is causing problems in the prepare workflow and others such as volume resize.

Comment 2 Luigi Toscano 2015-12-22 13:52:37 UTC
Thanks for finding the issue! I didn't check the code on the guestagent and I didn't notice this change. Indeed, the issue described above does not show anymore after restoring the value of MYSQL_BIN_CANDIDATES (with the RHEL-provided mariadb 5.5 packages).

Comment 6 Nick Barcet 2016-06-29 20:39:37 UTC
Based on ​customer feedback, and the constant message that support for commercially available database was an absolute must from the almost all of the customers we surveyed, we have came to the conclusion that we should rather concentrate our effort in having successful partnerships around Trove rather than building a fully open-source solution that will not benefit our customers.

Comment 7 Luigi Toscano 2016-06-30 10:55:16 UTC
This was indirectly fixed in the current build (post 4.0.0-4).