Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1134033 - mysqld_safe generates errors on sed
mysqld_safe generates errors on sed
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: mariadb-galera (Show other bugs)
5.0 (RHEL 7)
Unspecified Unspecified
low Severity low
: z4
: 6.0 (Juno)
Assigned To: Michael Bayer
Leonid Natapov
: ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-26 12:22 EDT by Ryan O'Hara
Modified: 2015-08-24 10:48 EDT (History)
7 users (show)

See Also:
Fixed In Version: mariadb-galera-5.5.41-3.el7ost
Doc Type: Bug Fix
Doc Text:
Prior to this update, a call to the 'sed' command within 'mysqld_safe.sh' (to certain command line arguments) failed to accommodate arguments which include a slash, such as the paths to SSL key and certificate files which are passed through this function. Consequently, the 'mysqld_safe.sh' script produced warnings of the form "unknown option to `s'". However, the script continued to work correctly, as these arguments are not actually needed in this specific context. This update addresses this issue by correcting the call to 'sed' so that SSL arguments which include slashes are properly interpreted. As a result, the warnings regarding 'sed' are now resolved.
Story Points: ---
Clone Of: 1134032
Environment:
Last Closed: 2015-08-24 10:48:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1659 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Bug Fix and Enhancement Advisory 2015-08-24 14:47:56 EDT

  None (edit)
Description Ryan O'Hara 2014-08-26 12:22:42 EDT
+++ This bug was initially created as a clone of Bug #1134032 +++

The mysqld_safe script that is used to start mariadb has bad delimeter for sed command in parse_arguments(). When the socket.ssl_cert and socket.ssl_key options are passed, mysqld_safe will generate the following errors:

Aug 26 11:11:31 mesa-virt-18.lab.msp.redhat.com mysqld_safe[23525]: sed: -e expression #1, char 26: unknown option to `s'
Aug 26 11:11:31 mesa-virt-18.lab.msp.redhat.com mysqld_safe[23525]: sed: -e expression #1, char 25: unknown option to `s'

It seems that sed has a problem here since it is using "/" as a delimeter and both socket.ssl_cert and socket.ssl_key take full paths, which of course include "/" characters.

Fix is to simply change:

arg=`echo $arg | sed "s/^$optname/$optname_subst/"`

to

arg=`echo $arg | sed "s|^$optname|$optname_subst|"`

Note that this error seems completely harmless. In my testing, the ssl_cert and ssl_key are set correctly even when the error occurs.
Comment 4 Michael Bayer 2015-04-23 16:09:43 EDT
OK we probably need to have a separate BZ then, i think thats how it works now...
Comment 7 Alexander Chuzhoy 2015-08-18 09:42:28 EDT
Verified:

Environment:
mariadb-galera-common-5.5.42-1.el7ost.x86_64
mariadb-galera-server-5.5.42-1.el7ost.x86_64


The line in /usr/bin/mysqld_safe now looks as following:

    arg=`echo $arg | sed "s|^$optname|$optname_subst|"`
Comment 9 errata-xmlrpc 2015-08-24 10:48:22 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.

https://rhn.redhat.com/errata/RHBA-2015-1659.html

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