Description:
I had a 3.0.5 agent configured with a non-standard setting in etc/log4j.properties
as follows:
log4j.logger.com.mysql.etools.agent = DEBUG
(default is INFO)
This is a configuration file and if different from the normal default setting can safely be updated on an update with a newer (different) file. However, if the file has changed from it's default setting then a DBA has likely modified this and an upgrade SHOULD NOT overwrite it (losing local modifications), but probably provide the file as (in this case) etc/log4j.properties.default (or similar).
This is how rpm handles configuration files and it would be useful if the MEM agent installer did the same thing as any local configuration changes (which may be needed) will get lost on an agent upgrade.
How to repeat:
See above when upgrading from 3.0.5 to 3.0.7, the file is overwritten with the default settings. This is not expected or wanted.
Suggested fix:
Follow the rules stated above for any local configuration files which the user _may_ change or is allowed to change.
1. Do not overwrite the file if local modifications exist
2. Do provide the expected file with a different name so the differences can be checked (maybe a .default suffix), but only in this case. If the file has not been changed overwrite the original config file even if it's changed from one version to the next.
Potentially give a warning to this behaviour.