pt-config-diff doesn't respect !includedir

Bug #1012893 reported by Simon Kuhn on 2012-06-13
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to

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).


     !includedir /etc/mysql/conf.d/


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.

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
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:

blah =1

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
Brian (brianwitt) wrote :

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

Percona now uses JIRA for bug reports so this bug report is migrated to:

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

Other bug subscribers