Configuring an RCM to start automatically from OpenSwitch

When you configure OpenSwitch using the configuration GUI during or after installation, and select replication coordination module on the second configuration screen, the product is automatically configured to start and stop the RCM when you start and stop OpenSwitch.

If you did not select replication coordination module in your initial OpenSwitch configuration, you must re-run the configuration GUI, make this selection, and complete the associated options on the various screens that display. Use the instructions in this section to complete these tasks.

StepsConfiguring an RCM autostart

  1. Shut down OpenSwitch if it is running.

  2. Start the OpenSwitch configuration GUI.

    NoteYou must configure OpenSwitch to use an RCM by selecting Replication Coordination Module on the second screen of the OpenSwitch configuration GUI.

    If you chose not to configure OpenSwitch during installation, start the configuration tool and use the instructions in “Configuring OpenSwitch using the GUI tool,” in Chapter 3, “Configuring OpenSwitch” in the OpenSwitch Installation Guide to complete the configuration.

  3. After you complete the configuration and close the configuration GUI, use a text editor to open the OpenSwitch configuration file.

    The configuration file is located in %OPENSWITCH%\config inWindows and in $OPENSWITCH/config in UNIX.

  4. Edit the following values in the file:

    Parameter

    Description

    RCM_AUTOSTART

    Instructs OpenSwitch whether to start the RCM.

    Enter:

    • 0 – zero (0) for false. If you do not select Replication Coordination Module, this value defaults to 0.

    • 1 – for true, which autostarts the RCM. When you choose Replication Coordination Module on the second screen of the configuration GUI, the value for this parameter is set to 1.

    RCM_RETRIES

    Tells OpenSwitch how many times to retry starting the RCM. If the RCM fails for reasons other than the user requesting that the RCM be shut down, OpenSwitch attempts to restart the RCM. If an unrequested shutdown of the RCM occurs within one minute of starting, OpenSwitch logs an error and does not attempt to restart the RCM.

    Enter:

    • 0 – zero (0). OpenSwitch does not attempt to restart the RCM. If you do not select Replication Coordination Module, this value defaults to zero (0).

    • 1 to ... – any numeric value that represents the number of times OpenSwitch should attempt to restart the RCM.

    This parameter is set to 1 when you choose Replication Coordination Module.

    RCM_PATH

    Enter the location where OpenSwitch should look for the RCM executable. If you do not enter a value, OpenSwitch runs the RCM located in $OPENSWITCH/bin on UNIX systems or in %OPENSWITCH%\bin on Windows systems; where OPENSWITCH is the installation directory.

    This parameter has a null value if you do not specify a path.

    RCM_CFG_FILE

    Enter the file and directory path where the RCM configuration file is located. This parameter has a null value if you do not specify a path.

    RCM_LOG_FILE

    Enter the file and directory path where the RCM log file should be created. This parameter has a null value if you do not specify a path.

    RCM_SECONDARY

    Instructs OpenSwitch whether the RCM that is being started is a primary or a secondary RCM.

    Enter:

    • 0 – zero for a primary RCM. This is the default value.

    • 1 – for a secondary RCM.

    RCM_TRC_FLAG

    There is no command line equivalent for this option.

    Use this option to set trace flags for RCM when you start RCM from OpenSwitch. Enter:

    • 1 – to set trace flags for RCM.

    • 0 – to disable trace flags for RCM. This is the default.

    This is a dynamic option and you can set it with the rp_set registered procedure. See rp_set for more details.

    See “OpenSwitch sample configuration file” for sample values.

  5. Save the configuration file, close the text editor and restart OpenSwitch.

  6. In a text editor, open the RCM configuration file located in %OPENSWITCH%\config on Windows and in $OPENSWITCH/config on UNIX.

  7. Edit the RCMNAME configuration parameter. To enter a unique name that allows OpenSwitch to identify the RCMs to which it is attached. OpenSwitch maintains an internal list of registered RCMs and uses the list to identify RCMs to shut down, or to display to the client application when rp_rcm_list is issued.

  8. Save the file and close the text editor.

  9. Optionally, use these RCM registered procedures to work with this feature: rp_rcm_startup, rp_rcm_shutdown, rp_rcm_connect_primary, rp_rcm_list. See “Registered Procedures” for syntax and use instructions