garb init.d script broken on Redhat/Centos

Bug #1425752 reported by Yves Trudeau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
New
Undecided
Raghavendra D Prabhu
5.6
Fix Released
Undecided
Raghavendra D Prabhu

Bug Description

Just plainly broken on "CentOS release 6.6 (Final)" using Percona-XtraDB-Cluster-garbd-3-3.8-1.3390.rhel6.x86_64. Here's the diff to make it works:

--- garb.orig 2015-02-25 16:39:06.550742189 -0700
+++ garb 2015-02-25 16:40:59.987742195 -0700
@@ -60,7 +60,7 @@
                     fi
                 fi
                echo -n $"Starting $prog: "
- runuser nobody -c "$prog $*" >/dev/null
+ runuser nobody -s /bin/sh -c "$prog $*" >/dev/null
                rcode=$?
                sleep 2
                [ $rcode -eq 0 ] && pidof $prog > $PIDFILE \
@@ -167,7 +167,7 @@
                return 1
        fi

- OPTIONS="-d -a gcomm://$ADDRESS"
+ OPTIONS="-d -a gcomm://${ADDRESS}:${PORT}"
        [ -n "$GALERA_GROUP" ] && OPTIONS="$OPTIONS -g $GALERA_GROUP"
        [ -n "$GALERA_OPTIONS" ] && OPTIONS="$OPTIONS -o $GALERA_OPTIONS"
        [ -n "$LOG_FILE" ] && OPTIONS="$OPTIONS -l $LOG_FILE"

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Right, even if it works without shell in latest runuser, with older one it fails as account unavailable.

For the second part,

- OPTIONS="-d -a gcomm://$ADDRESS"
 + if ! grep -q ':' <<< $ADDRESS; then
 + OPTIONS="-d -a gcomm://$ADDRESS:$GALERA_PORT"
 + else
 + OPTIONS="-d -a gcomm://$ADDRESS"
 + fi
 +

works better

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-1804

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.