Bug #44003 Upgrade installers should respect existing config properties
Submitted: 1 Apr 2009 0:57 Modified: 21 Sep 2009 12:48
Reporter: Adam Dixon Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Installing Severity:S3 (Non-critical)
Version:2.x OS:Any
Assigned to: BitRock Merlin CPU Architecture:Any

[1 Apr 2009 0:57] Adam Dixon
Description:
When using an upgrade installer, it overwrites/resets custom settings in WEB-INF/config.properties.
eg: sets database host back to localhost.

This is very inconvenient for large installations with separate backend/frontend systems for load reasons.

It would also be a good idea to display somewhere which backend database is being connected to (for informational reasons)
@@hostname
@@datadir

How to repeat:
Have a modified config.properties, upgrade.

Suggested fix:
Respect custom configurations for config.properties
[2 Apr 2009 16:35] BitRock Merlin
The current upgrade installer gets the database information from the previous config.properties (only the mysql user, password, port and key) and writes the same information in the new one. As the current MEM installer only supports its own MySQL database it seems that the upgrade should not support a different value for "mysql.host" parameter. The "datadir" parameter is not configured by default in this file. Could you specify the desired upgrade approach to resolve this issue? Please specify the Target Version, thanks.
[13 Apr 2009 9:20] Simon Mudd
I'm currently using 2.0.5.7153 as this is the latest production version.

The merlin instance may be running on a virtual ip on the same server, or it may be running on a remote server. Do you care? You have the correct connection information in mysql.host, so please DO NOT overwrite it. Why is this any different to a different mysql.port?

The comment about the host and datadir to which mysql is connected was intended for the merlin development team. To show this information in the front-end merlin "Settings page". Currently there is no information which shows which host:port is being connected to. The datadir may distinguish if the location of the files is different to the default configuration. This information is thus useful to mysql/merlin support staff to.

I hope this clarifies the request.
[1 May 2009 21:25] Andy Bang
To clarify one thing: the parameter is mysql.server, not mysql.host.
[1 May 2009 21:34] Andy Bang
I don't see that the upgrade installer asks the user for anything that goes into config.properties -- it only asks about the Tomcat ports and those go in server.xml, not config.properties.

So isn't the fix for this quite easy -- just use (or copy over) the old config.properties file (the one that's already there)?
[14 May 2009 14:07] BitRock Merlin
Patch sent to Keith.
[18 May 2009 19:25] Keith Russell
Patch installed in versions => 2.1.0.1043.
[21 May 2009 15:46] Diego Medina
Verified fixed on 2.1.0.1047
[21 May 2009 15:47] Diego Medina
Doc Team:
once it is documented on the 2.1 docs, please set back to Verified so that it gets applied to the 2.0 installers as well
[21 May 2009 15:57] Keith Russell
Please make this change for 2.0 also.
[25 May 2009 12:23] BitRock Merlin
Patch for 2.0 version sent to Keith.
[20 Jun 2009 21:03] Sloan Childers
2.1.0.1070
[31 Jul 2009 3:32] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.0.6.7159.
[26 Aug 2009 17:28] Enterprise Tools JIRA Robot
Diego Medina writes: 
Verified fixed on 2.0.6.7160
[21 Sep 2009 12:48] Tony Bedford
An entry was added to the 2.0.6 and 2.1.0 changelogs:

The upgrade installer overwrote any custom settings stored in WEB-INF/config.properties. For example it set the database host back to localhost.