pt-config-diff doesn't respect !includedir

Bug #1012893 reported by Simon Kuhn
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Confirmed
Low
Unassigned

Bug Description

pt-config-diff from percona toolkit 2.1.2, used to compare a running MySQL instance with its installed config files on the filesystem, doesn't properly represent the state of the config files if !includedir or !include is used (as is common on Debian and Ubuntu).

E.g.:

/etc/mysql/my.cnf:
     !includedir /etc/mysql/conf.d/

/etc/mysql/conf.d/blah.cnf:
     <directives>

pt-config-diff /etc/mysql/my.cnf u=root,h=localhost,p=blah

The comparison is made only between my.cnf and MySQL's running config, which is not really as expected.

It can be worked around with something like the following:

    cat $(find /etc/mysql/ -type f -regex .*cnf -printf %p\ ) > /tmp/mysql.cnf

and then using the output file with pt-config-diff.

Revision history for this message
Baron Schwartz (baron-xaprb) wrote :

Thanks for the bug report and suggested workaround. I can confirm that the tool doesn't do anything with include directives. We can consider implementing this at some point; in the meantime I will just mark this as confirmed, low priority.

Changed in percona-toolkit:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Simon Kuhn (simon.kuhn) wrote :

Actually, the workaround I mentioned doesn't work because you're likely to wind up with a concatenated file like:

[mysqld]
blah =1

[mysqld]
blah = 2

Which the tool won't parse in the same manner that MySQL would parse the original config files (blah = 2), leaving you with false negative / positives.

tags: added: pt-config-diff
Revision history for this message
bwitt (brianwitt) wrote :

This bug is very annoying. There's no good workaround.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-781

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.