pt-config-diff doesn't respect !includedir

Reported by Simon Kuhn on 2012-06-13
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit
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.

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:

[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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers