Bug #72202 MEM agent upgrades should not overwrite configuration files
Submitted: 1 Apr 2014 21:01 Modified: 2 Apr 2014 13:33
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:3.0.5/7 OS:Any
Assigned to: CPU Architecture:Any
Tags: Agent, upgrade, windmill

[1 Apr 2014 21:01] Simon Mudd
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.
[2 Apr 2014 5:16] Umesh Shastry
Hello Simon,

Thank you for the bug report.