Bug #44379 enhance mysqlmonitorctl.sh to support distributed repository/tomcat installation
Submitted: 21 Apr 2009 11:35 Modified: 27 Jul 2009 15:24
Reporter: Axel Schwenke Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Server Severity:S4 (Feature request)
Version:2.1.0 OS:Any
Assigned to: Keith Russell CPU Architecture:Any

[21 Apr 2009 11:35] Axel Schwenke
Description:
mysqlmonitorctl.sh assumes the repository mysqld and the tomcat are running on the same box. In large installations it may be desirable to put those on separate machines. The control script should be enhanced to take care of this.

How to repeat:
In an installation where you have the repository mysqld on one machine and tomcat on another, mysqlmonitorctl.sh starts tomcat/mysqld on both machines respectively, wasting resources.

Suggested fix:
Add a configuration option or split the script.
[21 Apr 2009 12:24] Simon Mudd
My initial thought would be to do something typical on RHEL for this type of situation. A /etc/sysconfig/merlin configuration file which is sourced by mysqlmonitorctl.sh and can adjust the default start/stop behaviour.

This is of course specific to CentOS / RHEL, so it may be better to provide a platform neutral file in /opt/mysql/enterprise/monitor/etc/XXXXXX and provide similar functionality.

Note: a file such as this should NOT be overwritten by any installer/upgrader and the normal start/stop script should work normally if the file does not exist.

This would be a welcome feature for 2.0.
[14 May 2009 15:46] Keith Russell
The following changes to the 'mysqlmonitorctl.sh' script will be made 
to facilitate this feature request.

The 'mysqlmonitorctl.sh' script will look for a new configuration file 
called 'mysqlmonitorctl.conf'.  This configuration file will be located 
in a new directory, 'etc/defaults', that will be relative to the install 
directory.
The configuration file contains 2 variables:
START_MYSQL=yes
START_TOMCAT=yes

The script will then start/stop MySQL and Tomcat accordingly.

Defaults for both variables in the file will be set to "yes".

The update installers will not overwrite this file.
[15 May 2009 15:22] BitRock Merlin
Patch sent to Keith.
[18 May 2009 19:29] Keith Russell
Patch installed in versions => 2.1.0.1043.
[19 May 2009 21:35] Marcos Palacios
Verified fixed in build 2.1.0.1043.

Note that since both the full installer and the update installer (without overwriting an existing mysqlmonitorctl.conf file) create this conf file, the enhanced mysqlmonitorctl.sh file requires such conf file to exist in order to do a start or stop.
[27 Jul 2009 15:24] Tony Bedford
A 'change' entry was added to the 2.1.0 changelog:

In large installations it can be desirable to locate the repository MySQL Server and the Tomcat server on difference computers to reduce load. However, the script mysqlmonitorctl.sh assumed these were running on the same server.

The script was therefore changed to accommodate the above requirement.

The mysqlmonitorctl.sh script now checks for a new configuration file called mysqlmonitorctl.conf. This configuration file is located in a new directory, etc/defaults, relative to the install directory. The configuration file contains 2 variables:

START_MYSQL=yes

START_TOMCAT=yes

The script will then start/stop the MySQL Server and Tomcat accordingly. Defaults for both variables in the file are set to “yes”. The update installers will not overwrite this file.