Bug #40410 Full installer does not uninstall or wipe out previous installation
Submitted: 29 Oct 2008 22:50 Modified: 11 Nov 2008 14:50
Reporter: Andy Bang Email Updates:
Status: Closed
Category:Monitoring: Install Severity:S2 (Serious)
Version:2.0 OS:Any
Assigned to: BitRock Merlin Target Version:2.0 RC-01
Triage: Needs Triage: D2 (Serious)

[29 Oct 2008 22:50] Andy Bang
Description:
The Service Manager installer does not uninstall or wipe out the previous installation
when you answer "Yes" to "The directory you selected already contains a MySQL
installation.  If you continue installation all data will be lost.  Do you wish to
continue?"

How to repeat:
1) Install an older build of the Service Manager (I used 7013 because this is the build
someone started with who first reported the problem).
2) Install an agent, start it, and let it run for a few minutes.
3) Stop all services and wait a few minutes.
4) Start the 7078 Service Manager installer.
5) Just click "Next" to accept defaults.
6) On the Installation Directory screen it will say: "The directory you selected already
contains a MySQL installation.  If you continue installation all data will be lost.  Do
you wish to continue?"
7) Click "Yes".
8) Finish installation and tell it to start the Service Manager.
9) You'll get a 404 error.  If you look in the Tomcat logs you'll see various error
messages including "Table merlin.schema_version does not exist".
10) Use a MySQL client to look in the MySQL server instance.  You'll see both a "merlin"
database and a "mem" database.  The "merlin" database is from the 7013 installation and
the "mem" database is from the 7078 installation.  The "merlin" database should not be
there if truly "all data will be lost".
11) Also note that on Windows you'll see two instances of "MySQL Enterprise Monitor" in
"Add/Remove Programs".

Suggested fix:
Wipe out all previous files before installing the new files and don't create a second
instance of the same thing in "Add/Remove Programs".

As an alternative, if the suggestion above is not feasible, we should not allow
installation to continue and should advise the user to uninstall the old one before
installing this one in the same place.
[29 Oct 2008 23:03] Andy Bang
BitRock Installer Log 1

Attachment: bitrock_installer_14716.log (text/plain), 89.73 KiB.

[29 Oct 2008 23:03] Andy Bang
BitRock Installer Log 2

Attachment: bitrock_installer_15604.log (text/plain), 131.65 KiB.

[29 Oct 2008 23:07] Andy Bang
If this only affected early 2.0 betas of the Monitor I would say the impact is minimal and
it's only a P3 (or even a P4).  But this could also impact people who have previously
installed 1.3 and think they're re-installing instead of doing an upgrade.
[30 Oct 2008 16:33] Andy Bang
Per our conversation, let's do this.  Instead of saying:

"The directory you selected already contains a MySQL installation.  If you continue
installation all data will be lost.  Do you wish to continue?"  "Yes" or "No"

say:

"The directory you selected already contains a MySQL Monitor installation.  Please select
another directory or uninstall the previous version before continuing."   "OK"  (pressing
OK takes you back to the screen where you select a directory)
[3 Nov 2008 15:38] BitRock Merlin
Patch sent to Keith.
[4 Nov 2008 22:52] Keith Russell
Patch applied in versions => 2.0.0.7091.
[7 Nov 2008 19:28] Marcos Palacios
Verified fixed in build 2.0.0.7092. 
Tested on both Windows XP and Mac OS X.
[11 Nov 2008 14:50] Tony Bedford
An entry was added to the 2.0 changelog:

The Service Manager installer did not uninstall or wipe out the previous installation if
you answered “Yes” to the question: 

“The directory you selected already contains a MySQL installation. If you continue
installation all data will be lost. Do you wish to continue?”