garb init.d script broken on Redhat/Centos
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-
--- garb.orig 2015-02-25 16:39:06.550742189 -0700
+++ garb 2015-02-25 16:40:59.987742195 -0700
@@ -60,7 +60,7 @@
fi
- runuser nobody -c "$prog $*" >/dev/null
+ runuser nobody -s /bin/sh -c "$prog $*" >/dev/null
[ $rcode -eq 0 ] && pidof $prog > $PIDFILE \
@@ -167,7 +167,7 @@
fi
- OPTIONS="-d -a gcomm://$ADDRESS"
+ OPTIONS="-d -a gcomm:/
[ -n "$GALERA_GROUP" ] && OPTIONS="$OPTIONS -g $GALERA_GROUP"
[ -n "$GALERA_OPTIONS" ] && OPTIONS="$OPTIONS -o $GALERA_OPTIONS"
[ -n "$LOG_FILE" ] && OPTIONS="$OPTIONS -l $LOG_FILE"
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" /$ADDRESS: $GALERA_ PORT"
+ if ! grep -q ':' <<< $ADDRESS; then
+ OPTIONS="-d -a gcomm:/
+ else
+ OPTIONS="-d -a gcomm://$ADDRESS"
+ fi
+
works better