pt-stalk fails to start if $HOME environment variable is not set
Bug #1266869 reported by
Valery Panov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Low
|
Frank Cizmich |
Bug Description
pt-stalk fails to start if $HOME environment variable is not set:
[root@test01 ~]# unset HOME
[root@test01 root]# pt-stalk --daemonize --dest /mnt/data/pt-stalk --threshold 70
/usr/bin/pt-stalk: line 257: HOME: unbound variable
This makes sense e.g. when run from the init script.
The issue can be easily workarounded by exporting HOME.
BTW it would also be good to have init script for the pt-stalk.
I've attached my version which is designed to work on CentOS, feel free to use it if you need it.
Related branches
lp:~percona-toolkit-dev/percona-toolkit/pt-stalk-fails-to-start-if-HOME-environment-variable-is-not-set-1266869
- Daniel Nichter: Pending requested
-
Diff: 159 lines (+47/-9)9 files modifiedbin/pt-ioprofile (+4/-1)
bin/pt-mext (+4/-1)
bin/pt-mysql-summary (+4/-1)
bin/pt-pmp (+4/-1)
bin/pt-sift (+4/-1)
bin/pt-stalk (+4/-1)
bin/pt-summary (+4/-1)
lib/bash/parse_options.sh (+5/-1)
t/lib/bash/parse_options.sh (+14/-1)
Changed in percona-toolkit: | |
status: | Confirmed → In Progress |
importance: | Undecided → Low |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
milestone: | none → 2.2.13 |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Confirmed on a new centos 6.4 instance.
[root@localhost vagrant]# unset HOME toolkit- 2.2.6-1. noarch
[root@localhost vagrant]# pt-stalk --daemonize --dest /mnt/data/pt-stalk --threshold 70
/usr/bin/pt-stalk: line 257: HOME: unbound variable
[root@localhost vagrant]# rpm -qa|grep percona-toolkit
percona-
@Valery - thanks for sharing your pt-stalk init script