wsrep_xtrabackup_sst-v2 sst-initial-timeout doesn't work when 'timeout -k' is unsupported
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
Undecided
|
Raghavendra D Prabhu | |||
5.6 |
Fix Released
|
Undecided
|
Raghavendra D Prabhu |
Bug Description
wsrep_xtrabacku
It is handled in the code like this::
```
recv_joiner()
{
...
if [[ $tmt -gt 0 && -x `which timeout` ]];then
if timeout --help | grep -q -- '-k';then
else
fi
timeit "$msg" "$ltcmd | $strmcmd; RC=( "\${PIPESTATUS[@]}" )"
else
timeit "$msg" "$tcmd | $strmcmd; RC=( "\${PIPESTATUS[@]}" )"
fi
....
}
```
RHEL 6.6 for example does not support the '-k' flag.
So the script falls back to just using 'timeout '
But I have seen that if 'timeout' is being used, that the timeout does not work. 'socat' command keeps on running forever....
The only way that I can get it to work is by adding timeout:
That sends the KILL signal upon timeout, which IMHO is the same as 'timeout -k'
I've had this with mariadb galera cluster 10.0.14 and 10.0.15. but PXC behavior will be the same.
Related branches
- Alexey Kopytov (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedscripts/wsrep_sst_xtrabackup-v2.sh (+1/-1)
- Alexey Kopytov (community): Needs Resubmitting
-
Diff: 12 lines (+1/-1)1 file modifiedscripts/wsrep_sst_xtrabackup-v2.sh (+1/-1)
summary: |
- wsrep_xtrabackup_sst-v2 timeout doesn't kill + wsrep_xtrabackup_sst-v2 sst-initial-timeout doesn't kill when 'timeout + -k' is unsupported |
summary: |
- wsrep_xtrabackup_sst-v2 sst-initial-timeout doesn't kill when 'timeout + wsrep_xtrabackup_sst-v2 sst-initial-timeout doesn't work when 'timeout -k' is unsupported |
Just checked on Oracle 6.6 (I don't have a RH or Centos) and it is confirmed, it doesn't have -k parameter:
Mandatory arguments to long options are mandatory for short options too.
specify the signal to be sent on timeout.
SIGNAL may be a name like `HUP' or a number.
See `kill -l` for a list of signals
-s, --signal=SIGNAL
--help display this help and exit
--version output version information and exit
So our script is not compatible with some distributions.
# timeout --version
timeout (GNU coreutils) 8.4