--config files don't support quoted values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
It seems that when columns-regex is set through a config file, pt-diskstat loses the outermost parts of the regular expression. Examples:
(garfield:~) macko% cat ~/.pt-diskstats
group-by=all
columns-
(garfield:~) macko% pt-diskstats --devices-
#ts device rd_cnc rd_rt wr_s wr_cnc wr_rt busy
1.0 sda 2.2 12.6 0.0 0.0 0.0 100%
^C
(garfield:~) macko% cat ~/.pt-diskstats
group-by=all
columns-
(garfield:~) macko% pt-diskstats --devices-
#ts device rd_cnc rd_rt wr_s wr_cnc wr_rt busy qtime
1.0 sda 2.2 12.6 0.0 0.0 0.0 100% 13.5
^C
(garfield:~) macko% cat ~/.pt-diskstats
group-by=all
columns-
(garfield:~) macko% pt-diskstats --devices-
#ts device rd_cnc rd_rt wr_s wr_cnc wr_rt busy qtime
1.0 sda 2.2 12.6 0.0 0.0 0.0 100% 13.5
^C
(garfield:~) macko% cat ~/.pt-diskstats
group-by=all
columns-
(garfield:~) macko% pt-diskstats --devices-
#ts device rd_cnc rd_rt wr_s wr_cnc wr_rt busy qtime stime
1.0 sda 2.2 12.6 0.0 0.0 0.0 100% 13.5 5.7
In every case 'rd_s' as well as the last column listed is missing in the output. This does not happen when columns-regex is specified in the command line.
Changed in percona-toolkit: | |
assignee: | nobody → Daniel Nichter (daniel-nichter) |
tags: |
added: all-tools config-file value-quoting removed: docs |
Changed in percona-toolkit: | |
assignee: | Daniel Nichter (daniel-nichter) → nobody |
importance: | Low → Undecided |
summary: |
- Configuration files don't support quoted values + --config files don't support quoted values |
The problem is that the quotes enclosing the option are considered to be part of the value itself. The real bug here is that we don't support leading or trailing whitespace, which could be considered a feature, not a bug. We'd need to understand quotes in order to do that. As it is, quotes are just characters after the = sign, nothing more.
I'll mark this as a documentation bug and we can fix it in the man page that applies to option parsing.