PKG XtraDB Cluster 5.6.34 sed error with proxy-protocol-networks (or any other option with a "/" in it)

Bug #1652838 reported by James Brown
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Fix Released
Undecided
EvgeniyPatlan

Bug Description

We're using `proxy-protocol-networks` with XtraDB Cluster, and mysqld_safe now throws an error on startup due to a sed invocation using / as the delimiter.

our config includes the following line (with real addresses)

    proxy_protocol_networks=a:b:c:d::/126, a:b:c:e::/128, a:b:c:f::/128

The fix is to apply the diff below to mysqld_safe:

--- /usr/bin/mysqld_safe-orig 2016-12-27 21:07:58.600018909 +0000
+++ /usr/bin/mysqld_safe 2016-12-27 21:14:14.960407758 +0000
@@ -303,14 +303,14 @@

   for arg do
     # the parameter after "=", or the whole $arg if no match
     val=`echo "$arg" | sed -e 's;^--[^=]*=;;'`
     # what's before "=", or the whole $arg if no match
- optname=`echo "$arg" | sed -e 's/^\(--[^=]*\)=.*$/\1/'`
+ optname=`echo "$arg" | sed -e 's;^\(--[^=]*\)=.*$;\1;'`
     # replace "_" by "-" ; mysqld_safe must accept "_" like mysqld does.
     optname_subst=`echo "$optname" | sed 's/_/-/g'`
- arg=`echo $arg | sed "s/^$optname/$optname_subst/"`
+ arg=`echo $arg | sed "s;^$optname;$optname_subst;"`
     case "$arg" in
       # these get passed explicitly to mysqld
       --basedir=*) MY_BASEDIR_VERSION="$val" ;;
       --datadir=*) DATADIR="$val" ;;
       --pid-file=*) pid_file="$val" ;;

Changed in percona-xtradb-cluster:
assignee: nobody → EvgeniyPatlan (evgeniy-patlan)
summary: - XtraDB Cluster 5.6.34 sed error with proxy-protocol-networks (or any
+ PKG XtraDB Cluster 5.6.34 sed error with proxy-protocol-networks (or any
other option with a "/" in it)
Changed in percona-xtradb-cluster:
milestone: none → 5.6.35-26.20
status: New → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1945

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.