Percona-XtraDB-Cluster-garbd-3-3.9-1.3494.rhel7.x86_64 systemd init script broken, fix added
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
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On the default installation of Percona-
I fixed it to add the following line in /usr/bin/
source /etc/sysconfig/garb
So the /usr/bin/
#!/bin/bash -ue
#
config=
source /etc/sysconfig/garb
log_failure() {
echo " ERROR! $@"
}
program_start() {
echo "Starting garbd"
}
start() {
if grep -q -E '^# REMOVE' $config;then
log_failure "Garbd config $config is not configured yet"
return 0
fi
# Check that node addresses are configured
set -x
if [[ -z "${GALERA_NODES:-}" ]]; then
log_failure "List of GALERA_NODES is not configured"
return 6
fi
if [[ -z "${GALERA_GROUP:-}" ]]; then
log_failure "GALERA_GROUP name is not configured"
return 6
fi
GALERA_
# Find a working node
for ADDRESS in ${GALERA_NODES} 0; do
HOST=$(echo $ADDRESS | cut -d \: -f 1 )
PORT=$(echo $ADDRESS | cut -s -d \: -f 2 )
PORT=
if [[ -x `which nc` ]] && nc -h 2>&1 | grep -q -- '-z';then
fi
done
if [ ${ADDRESS} == "0" ]; then
log_failure "None of the nodes in $GALERA_NODES is accessible"
return 1
fi
OPTIONS=" -a gcomm://$ADDRESS "
[ -n "${GALERA_GROUP:-}" ] && OPTIONS="$OPTIONS -g $GALERA_GROUP"
[ -n "${GALERA_
[ -n "${LOG_FILE:-}" ] && OPTIONS="$OPTIONS -l $LOG_FILE"
program_start $OPTIONS
}
# See how we were called.
case "$1" in
start)
start
;;
*)
echo $"Usage: $0 {start}"
exit 2
esac
exit $?
Confirmed.
[root@localhost ~]# rpm -qa | grep -i garbd XtraDB- Cluster- garbd-3- 3.9-1.3494. rhel7.x86_ 64
Percona-
[root@localhost ~]#
[root@localhost ~]# cat /etc/sysconfig/garb
# Copyright (C) 2012 Codership Oy
# This config file is to be sourced by garb service script.
# A space-separated list of node addresses (address[:port]) in the cluster NODES=" 192.168. 7.104"
GALERA_
# Galera cluster name, should be the same as on the rest of the nodes. GROUP=" my_centos7_ cluster"
GALERA_
# Optional Galera internal options string (e.g. SSL settings) www.codership. com/wiki/ doku.php? id=galera_ parameters
# see http://
GALERA_OPTIONS=""
# Log file for garbd. Optional, by default logs to syslog "/root/ garbd.log"
# Deprecated for CentOS7, use journalctl to query the log for garbd
LOG_FILE=
[root@localhost ~]#
[root@localhost ~]# head -7 /usr/bin/ garb-systemd
#!/bin/bash -ue
#
config= /etc/sysconfig/ garb
log_failure() {
echo " ERROR! $@"
[root@localhost ~]#
[root@localhost ~]# garb-systemd start
ERROR! List of GALERA_NODES is not configured
[root@localhost ~]#
[root@localhost ~]# head -7 /usr/bin/ garb-systemd
#!/bin/bash -ue
#
config= /etc/sysconfig/ garb
source /etc/sysconfig/garb
log_failure() {
[root@localhost ~]#
[root@localhost ~]# garb-systemd start garb-systemd: line 13: 4742 Aborted (core dumped) /usr/bin/garbd $*
Starting garbd
terminate called after throwing an instance of 'gu::NotSet'
/usr/bin/
[root@localhost ~]#