pt-kill does not report failure exit code
Bug #1314500 reported by
Elan Ruusamäe
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
In Progress
|
Low
|
Frank Cizmich |
Bug Description
pt-kill should exit non-zero if it failed to start the daemon:
# sudo -H -u mysql /usr/bin/pt-kill --config /etc/percona-
Cannot open PID file /var/run/
root@blodnatt run/percona-
0
root@blodnatt run/percona-
pt-kill 2.2.7
Related branches
lp://staging/~percona-toolkit-dev/percona-toolkit/pt-kill-does-not-report-failure-exit-code-1314500
On hold
for merging
into
lp://staging/~percona-toolkit-dev/percona-toolkit/release-2.2.11
- Daniel Nichter: Needs Information
-
Diff: 69 lines (+21/-2)3 files modifiedbin/pt-kill (+8/-0)
t/pt-kill/basics.t (+12/-1)
t/pt-kill/execute_command.t (+1/-1)
tags: | added: pt-kill |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
milestone: | none → 2.2.11 |
Changed in percona-toolkit: | |
status: | Fix Committed → In Progress |
Changed in percona-toolkit: | |
milestone: | 2.2.11 → 2.2.12 |
Changed in percona-toolkit: | |
milestone: | 2.2.12 → none |
To post a comment you must log in.
Unable to reproduce with pt-kill-2.2.9, can you please install latest version and check?
nilnandan@ nilnandan- Dell-XPS: ~$ pt-kill --version nilnandan- Dell-XPS: ~$ nilnandan- Dell-XPS: ~$ sudo -H -u mysql /usr/bin/pt-kill --config /etc/percona- toolkit/ pt-kill. conf --kill-query --daemonize --pid /var/run/ percona- toolkit/ pt-kill. pid --sentinel /var/run/ percona- toolkit/ pt-kill. sentinel ';host= localhost; mysql_read_ default_ group=client' ,'',... ) failed: Access denied for user 'nilnandan' @'localhost' (using password: NO) at /usr/bin/pt-kill line 2059. nilnandan- Dell-XPS: ~$ echo $? nilnandan- Dell-XPS: ~$
pt-kill 2.2.9
nilnandan@
nilnandan@
DBI connect(
nilnandan@
255
nilnandan@
nilnandan@ nilnandan- Dell-XPS: ~$ pt-kill --user=root --match-command Sleep --kill --victims all --interval 10 ';host= localhost; mysql_read_ default_ group=client' ,'root' ,...) failed: Access denied for user 'root'@'localhost' (using password: NO) at /usr/bin/pt-kill line 2059. nilnandan- Dell-XPS: ~$ nilnandan- Dell-XPS: ~$ echo $? nilnandan- Dell-XPS: ~$ nilnandan- Dell-XPS: ~$ pt-kill --user=root --match-command Sleep --kill --victims all --interval 10 --config /etc/percona- toolkit/ pt-kill
DBI connect(
nilnandan@
nilnandan@
255
nilnandan@
nilnandan@
Unknown option: config
Usage: pt-kill [OPTIONS] [DSN]
Errors in command-line arguments:
* Error parsing options
pt-kill kills MySQL connections. pt-kill connects to MySQL and gets queries from nilnandan- Dell-XPS: ~$ nilnandan- Dell-XPS: ~$ echo $? nilnandan- Dell-XPS: ~$
SHOW PROCESSLIST if no FILE is given. Else, it reads queries from one or more
FILE which contains the output of SHOW PROCESSLIST. If FILE is -, pt-kill reads
from STDIN. For more details, please use the --help option, or try 'perldoc
/usr/bin/pt-kill' for complete documentation.
nilnandan@
nilnandan@
1
nilnandan@