Patch-ID# 117720-07 NOTE: *********************************************************************** READ THE TERMS OF THE AGREEMENT ("AGREEMENT") IN THE LEGAL_LICENSE.TXT FILE CAREFULLY BEFORE USING THIS SOFTWARE. BY USING THE SOFTWARE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS, PROMPTLY DESTROY THE UNUSED SOFTWARE. *********************************************************************** Keywords: sunwscmys Synopsis: Sun Cluster 3.1_x86: HA-MYSQL patch Date: Mar/15/2006 Install Requirements: See Special Install Instructions Solaris Release: 9_x86 10_x86 SunOS Release: 5.9_x86 5.10_x86 Unbundled Product: Sun Cluster Unbundled Release: 3.1_x86 Xref: this patch is available for SPARC as patch 117719 Topic: Sun Cluster 3.1_x86: HA-MYSQL patch Relevant Architectures: all BugId's fixed with this patch: 4976081 6206308 6219431 6261485 6264690 6299955 6299961 6299973 6320597 6376358 Changes incorporated in this version: 6264690 6261485 4976081 6206308 6219431 6299973 6299961 6299955 6320597 Patches accumulated and obsoleted by this patch: Patches which conflict with this patch: Patches required with this patch: Obsoleted by: Files included with this patch: /opt/SUNWscmys/bin/control_mysql /opt/SUNWscmys/bin/functions /opt/SUNWscmys/bin/probe_mysql /opt/SUNWscmys/bin/probe_smf_mysql /opt/SUNWscmys/bin/start_mysql /opt/SUNWscmys/bin/stop_mysql /opt/SUNWscmys/etc/SUNW.mys /opt/SUNWscmys/lib/functions_static /opt/SUNWscmys/util/ha_mysql_config /opt/SUNWscmys/util/ha_mysql_register /opt/SUNWscmys/util/ha_mysql_smf_register /opt/SUNWscmys/util/ha_mysql_smf_remove /opt/SUNWscmys/util/mysql_config /opt/SUNWscmys/util/mysql_register Problem Description: 6376358 The project is not chosen according to the RG_project_name property From (117720-06) 6320597 The error messages of ha-mysqlt for wrong options mention the zsh/smf component From (117720-05) 6299973 ha mysql uses set_status on every probe 6299961 ha mysql accepts a configuration file with a hardcoded name only 6299955 ha mysql needs to be zone aware From (117720-04) 6264690 The MYSQLHOST variable is not mentioned in the config file example From (117720-03) 6261485 logical hostname needs to be the same as the ip-name From (117720-02) 6219431 the mysql agent needs to support Live Upgrade ins SC 3.1U4 6206308 resource type file for mysql needs service name tag From 117720-01 4976081 The agent should contain a dummy RTR file Patch Installation Instructions: -------------------------------- There are three (3) possible procedures for installing patches on Sun Cluster 3.0 and 3.1. The proper method to use and any additional instructions, for this patch are specified below in the "Special Install Instructions" section. Refer to the chapter entitled "Patching Sun Cluster Software and Firmware" in the Sun Cluster 3.0/3.1 System Administration Guide for a description of the different install processes and instructions on how to install Sun Cluster 3.x patches. For Solaris 8 release, refer to the man pages for instructions on using 'patchadd' and 'patchrm' scripts provided with Solaris. For Solaris 10 release, apply the patch with the -G option Special Install Instructions: ----------------------------- NOTE 1: If you add this patch a system with 117720-02 or 117720-01 and you want to register a new mysql instance, you need to adhere, that there is a new variable in ha_mysql_config. MYSQLHOST This variable must be set to the ip-name which corresponds with the appropriate logical host resource. This offers the freedom for configurations like: LH=myhost-lh MYSQLHOST=myhost Where myhost-lh is the name of the SC resource which corresponds at least with the ip address of myhost. NOTE 2: Improvements from the Patch Revision 117720-05 ---------------------------------------------- Installation improvements: -------------------------- The Revision 117720-05 of this patch introduced the possibility to run every register script with an optional configuration file. To generate the configuration file, copy the ha_mysql_config file or the mysql_config file and adapt the parameters. The syntax is of the registration: ksh /opt/SUNWscmys/util/ha_mysql_register [-f ] If you omit the -f option the config file /opt/SUNWscmys/util/ha_mysql_config is used as a default. The option -f is valid for mysql_register,ha_mysqql_register, ha_mysql_smf_register, and ha_mysql_smf_remove Changes in the configuration file --------------------------------- The patch revision 04 introduced 3 new variables in the configuration file. All the three variables are needed for local zone configurations only and can be omitted for a global zone installation. ZONE ZONE_BT PROJECT The variable ZONE is is the local zone name where Mysql should run in. The presence of this variable is the trigger to register HA Mysql for a local zone. The variable ZONE_BT needs to be the resource name of the resource which controls the zone. The variable PROJECT stands for the Sun Resource Manager Project in the local zone. If PROJECT is omitted, it translates as the default project of the user (:default in an smf context). This project is placed in the start/project and the stop/project property of the smf service. Installation of a mysql agent in the local zone ------------------------------------------------ At first you need to install the Sun Cluster HA Container agent and configure the boot component to control your local zone. For additional information consider the Sun Cluster manual on docs.sun.com. Preparation of your local zone ------------------------------ Inherit at least the directory of the Mysql agent in your local zone. This can only be done at zone creation. To have all the agent directories in one shot, inherit the /opt directory. Usage of the Container agent ---------------------------- The Mysql registration generates a smf manifest and a smf service in the local zone. The manifest is named .xml and is placed in /var/svc/manifest/application/sczone-agents. The Service is named svc:/application/sczone-agents/ The Mysql agent uses the smf component of the container agent. It registers a Sun Cluster HA Container smf component on top of the already created smf service. Registration ------------ To register the Mysql agent in a local zone, copy the ha_mysql_config file somewhere, and adapt the variables as appropriate. Do not forget the ZONE and ZONEBT variables. It is best practice to keep the configuration file for future use. Call the ha_mysql_register script with -f . Example: ./ha_mysql_register -f This procedure generates the manifest and registers the smf service in the local zone. In addition the smf component of the container agent is configured to control and probe the smf service of The Apache Tomcat agent. The start and stop script for the manifest is the control_mysql script. The control_mysql script is also the probe script for the smf component. All the necessary parameters for the Mysql manifest are stored as properties in the service. These properties are changeable with svccfg. After changing the properties you should validate the parameters in the local zone. You need login into the local zone as root and call: /opt/SUNWscmys/bin/control_mysql validate Messages are stored in /var/adm/messages of the local zone. Removing a Mysql resource configured in a local zone ---------------------------------------------------- To remove the Mysql in a local zone, you need to disable and remove the appropriate Sun Cluster Resource first. In addition, you need to call: /opt/SUNWscmys/ha_mysql_smf_remove -f Use the configuration file you specified at resource creation. If this configuration file is lost, configure the the ZONE and the RS variable in a vanilla configuration file. Debugging a Mysql agent resource -------------------------------- The Mysql agent accepts now a "," separated list of resources in the DEBUG Variable in /opt/SUNWscmys/etc/config. A korn shell trace and additional debug messages are produced, if the resource name matches a resource in the list contained in the DEBUG variable, or if the DEBUG variable is set to all. If you debug a local zone installation you will find the korn shell trace of the start and stop methods under: /var/svc/log/application-sczone-agents:.log README -- Last modified date: Wednesday, March 15, 2006