Bug #43538 MEM monitor installer incorrectly calculates needed free space to install
Submitted: 10 Mar 2009 17:37 Modified: 21 Sep 2009 12:17
Reporter: Leandro Morgado Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Installing Severity:S2 (Serious)
Version:2.0.4.7141 OS:Linux
Assigned to: BitRock Merlin CPU Architecture:Any

[10 Mar 2009 17:37] Leandro Morgado
Description:
Tried installing the monitor on RHEL5.3 on the following partition:

/dev/mapper/vg1-mysql   1008M   34M  924M   4% /opt/mysql

Install went fine until the end when the following message was received:

Error: Error running /opt/mysql/enterprise/monitor/mysql/bin/mysql
--defaults-file=/opt/mysql/enterprise/monitor/mysql/my.cnf -S
/opt/mysql/enterprise/monitor/mysql/tmp/mysql.sock -u root -D mysql -e "update
user set Password = PASSWORD('XXXXXXX') where User = 'root'; update user set
User = 'service_manager' where User = 'root';delete from user where User =
'';flush privileges;" : ERROR 2002 (HY000): Can't connect to local MySQL server
through socket '/opt/mysql/enterprise/monitor/mysql/tmp/mysql.sock' (2)

This was solved after doubling the disk space on that partition. 

It seems that the package does check for disk space constraints but does not calculate then correctly:

"Not enough space left on disk. Please note that the installation requires at least 275 MB of free space. Do you wish to continue? [y/N]: N "

How to repeat:
Fresh install on a partition with 924M free disk space (see above).

Suggested fix:
1) Calculate the needed disk space correctly taking into account any space needed for temporary installation files

2) Specify disk space needed in requirements at:
 https://enterprise.mysql.com/monitoring/
[10 Mar 2009 17:42] Keith Russell
Bitrock, Can you please review and comment/correct? Thanks.
[10 Mar 2009 19:13] BitRock Merlin
The installer checks the free space and it compares to a defined value. The default value is 275M for Unix platforms and 255M for Windows platforms. We have verified that the size of a MySQL Monitor 2.1 installation directory is about 820M. It seems that the cause of this increase is the size of "mysql/data/ib_logfile0" and "mysql/data/ib_logfile1". Could you send us the new size values to check the free disk space during the installation?
[16 Mar 2009 16:43] Andy Bang
Here's the amount of space we take for recent versions of the Service Manager:

OS                     2.0.5    2.1.0
-------------------- -------   ------
Mac OS X             1.12 GB   752 MB
Linux 32-bit         1.20 GB   813 MB
Linux 64-bit         1.18 GB   831 MB
Solaris SPARC 64-bit 1.24 GB   924 MB
Solaris x86-64       1.20 GB   863 MB
Windows              1.12 GB   674 MB

So I suggest that we require 1.3 GB free space for a 2.0 installation and 1 GB free space for a 2.1 installation.

As a side note, 2.0 takes more space than 2.1 because we included "innodb_data_file_path = ibdata1:500M:autoextend" in my.cnf in 2.0, whereas in 2.1 we let that default (to 10M) and use innodb_file_per_table.
[17 Mar 2009 14:31] BitRock Merlin
Patch sent to Keith.
[18 Mar 2009 21:59] Keith Russell
Patch installed in versions => 2.1.0.1018.
[28 Apr 2009 21:16] Andy Bang
Seems like there are two issues left to resolve:

1) The unattended install should stop when there is not enough disk space.

2) Regarding the "There are 1024MB of free space, but at least 1024 MB are needed" message, perhaps you're doing a simple ">" than check when you should be doing ">="?
[30 Apr 2009 11:36] BitRock Merlin
Patch sent to Keith.
[4 May 2009 23:28] Keith Russell
Patch installed in versions => 2.1.0.1036.
[18 May 2009 19:01] Carsten Segieth
tested OK with 2.1.0.1036 on all server platforms
[18 May 2009 19:10] Carsten Segieth
re-opening this for 2.0
[18 May 2009 19:20] Keith Russell
Waiting on 2.0 build
[31 Jul 2009 3:04] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.0.6.7159.
[27 Aug 2009 17:18] Enterprise Tools JIRA Robot
Carsten Segieth writes: 
- build 2.0.6.7159 (osx: 7160) requires 1332MB, I take (and accept) this as a rounding issue.
- tested OK so far the installers for Solaris-Sparc, OSX, Linux-x86, other OS tests still in progress.
[27 Aug 2009 18:53] Enterprise Tools JIRA Robot
Carsten Segieth writes: 
build 2.0.6.7159 now tested also OK for the 3 remaining installers
[21 Sep 2009 12:17] Tony Bedford
An entry was added to the 2.1.0 and 2.0.6 changelogs:

The MySQL Enterprise Monitor installer failed to install correctly due to insufficient disk space, even though the installer calculated there was suffcient disk space for the installation. This was due to the installer having out of date information regarding disk space requirements.