Configuration file parameters

Table 6-1 lists the OpenSwitch configuration parameters specific to mutually-aware OpenSwitch servers. Parameters are listed alphabetically within each configuration file section for ease of reference.

Table 6-1: Mutually-aware configuration parameters

Section

Parameter

Description

[CONFIG]

CMON_FAIL_ACTION

NoteRequired when MUTUAL_AWARE=1. However, this parameter is not specific to only mutually-aware OpenSwitch servers; it applies to all OpenSwitch servers with CMON set to 1.

Enter one of these actions:

  • DEFAULT

  • CUSTOM

  • MANUAL

  • CUSTOM_MANUAL

NoteOpenSwitch currently supports only the DEFAULT action for CMON_FAIL_ACTION.

The selected action is invoked only when the CMON configuration parameter is set to 1 (the recommended setting), and when the CMON thread that monitors the health of the Adaptive Server fails to start. See Table 5-1 for information about the CMON parameter.

See “CMON_FAIL_ACTION” for more information about this parameter. See “User-specified actions” for details about each action.

[CONFIG]

CMP_FAIL_ACTION

NoteRequired only when MUTUAL_AWARE=1.

Enter one of these actions:

  • DEFAULT

  • CUSTOM

  • MANUAL

  • CUSTOM_MANUAL

This parameter is used when network connectivity is lost to the companion OpenSwitch in a mutually-aware setup. Once the network is restored and the connection to the companion is re-established, the two OpenSwitch servers synchronize their configurations.

See “CMP_FAIL_ACTION” for more information about this parameter. See “User-specified actions” for details about each action.

[CONFIG]

CUSTOM_SCRIPT

The path to the user-created script to invoke.

NoteWhen MUTUAL_AWARE=1, the scripts for both OpenSwitch companions must perform the same action. When a server fails over and SVR_FAIL_ACTION is set to to MANUAL or CUSTOM, only one of the companions executes the script that notifies the administrator or restarts the server.

See “User-specified actions” for details about which exit codes to use in custom scripts.

[CONFIG]

FREEZE_CFG_ON_FAIL

Whether OpenSwitch locks all server and pool configurations (forbids all changes) when a network break is suspected between the companions during CMP_FAIL_ACTION. Enter:

  • 0 – allows the OpenSwitch server to continue servicing clients as if it were the only OpenSwitch running in a mutually-aware cluster. All configuration changes, including server and pool status changes, are permitted. This is the default.

  • 1 – allows the OpenSwitch server to continue servicing clients, but forbids any changes to the server or pool configuration and status.

[CONFIG]

MANUAL_SCRIPT

The path to the user-created manual script.

See “User-specified actions” for details about which exit codes to use in manual scripts.

[CONFIG]

MUTUAL_AWARE

Specifies whether to use mutually-aware OpenSwitch servers. Enter:

  • 1 for a mutually-aware OpenSwitch.

  • 0 for a non-mutually-aware OpenSwitch, which is the default.

[CONFIG]

MUTUAL_CLUSTER

NoteRequired only when MUTUAL_AWARE=1.

A string that represents a mutually-aware cluster. This string must be exactly the same on both OpenSwitch servers, and is used to name the configuration table in the CFG_STORAGE servers (see “[SERVER]”).

When this parameter is not set, it defaults to “CLUSTER1”.

[CONFIG]

NET_FAIL_ACTION

NoteRequired only when MUTUAL_AWARE=1.

Enter one of these actions:

  • DEFAULT

  • CUSTOM

  • MANUAL

  • CUSTOM_MANUAL

This parameter is used when the local OpenSwitch is experiencing a network outage and cannot communicate with the Adaptive Servers or companion OpenSwitch hosts.

See “NET_FAIL_ACTION” for more information about this parameter. See “User-specified actions” for details about each action.

[CONFIG]

PING_BINARY

The absolute path to the system ping command. When this parameter is not set, it defaults to ping, which relies on the PATH environment variable to locate the correct binary.

[CONFIG]

PING_RETRIES

The number of times that OpenSwitch should ping a server to rule out possible network problems. This parameter is used in numerous places, when the status must be known of a companion or Adaptive Server.

The default is “1”.

[CONFIG]

PING_THREAD

Valid values are 0 (zero) or 1. The default is 1.

When set to 1, PING_THREAD detects the failure when an Adaptive Server host or network stops running.

In a mutually-aware environment, the primary companion OpenSwitch checks to see if the entire network has failed or only the Adaptive Server host network. If the Adaptive Server host network has failed, the primary companion OpenSwitch is notified immediately and the action set for SVR_FAIL_ACTION is invoked.

When set to zero (0), the primary companion OpenSwitch is notified of a network failure with Adaptive Server after only 8 minutes, which is the default TCP/IP tcp_ip_abort_interval configuration parameter.

NoteDo not use this parameter to monitor the network between clients and OpenSwitch. If the network connection from the client to the OpenSwitch fails, the client detects the failure only when the tcp_ip_abort_interval time has elapsed. This is a kernel parameter that defaults to 8 minutes, but can be tuned to a lower value if the default is unacceptable.

The length of strings holding the host name of a machine is limited to 30 characters within the OpenSwitch process. If a host name exceeds this limit, only the first 30 characters is used and may lead to incorrect results or failure during execution.

[CONFIG]

PING_WAIT

The number of seconds that the ping command should wait before returning a failure. This parameter is used in conjunction with PING_RETRIES, on platforms where the ping command blocks instead of returning right away.

The default is 10 (seconds).

[CONFIG]

PRIMARY_COMPANION

NoteRequired only when MUTUAL_AWARE=1.

Enter:

  • 0 – the default.

  • 1 – when this is the designated primary companion. A primary companion is responsible for writing to the Adaptive Server cluster tables.

[CONFIG]

SVR_FAIL_ACTION

NoteRequired only when MUTUAL_AWARE=1.

Enter one of these actions:

  • DEFAULT

  • CUSTOM

  • MANUAL

  • CUSTOM_MANUAL

This parameter is used when an Adaptive Server fails to respond in a timely manner, or when the Adaptive Server host cannot be pinged by either OpenSwitch server in a cluster.

See “SVR_FAIL_ACTION” for more information. See “User-specified actions” for details about the available actions.

[CONFIG]

UPDATE_CFG

When set to 1, the configuration file is updated each time a reconfiguration takes place. Zero (0) is the default setting. You must run mutual-aware support with UPDATE_CFG=1.

[SERVER]

CFG_STORAGE

When this property is set for an Adaptive Server, that Adaptive Server is used to store the configuration information of the mutually-aware OpenSwitch clusters. Enter:

  • 0 – do not use this Adaptive Server to store the configuration information of the mutually-aware OpenSwitch clusters.This is the default value.

  • 1 – store the configuration information of the mutually-aware OpenSwitch clusters on this Adaptive Server.

In a mutually-aware setup, you must include this parameter under the two Adaptive Server entries; for example:

[SERVER=ASE1]
STATUS=UP
CFG_STORAGE=1

[SERVER=ASE2]
STATUS=UP
CFG_STORAGE=1

In the example above, the most recent OpenSwitch configuration is stored in the syso_<cluster> table in ASE1 and ASE2. Therefore, when a mutually-aware OpenSwitch server fails to connect to its companion OpenSwitch for the latest configuration information, it queries both ASE1 and ASE2 to retrieve that information.

[COMPANION]

companion_name

admin_user

admin_password

Name of the OpenSwitch companion, and the administrator user name and password used to make a connection. For example:

[COMPANION=OSW2]
     admin_user=sa
     admin_password=sa

These should be the same as the values for SERVER_NAME, ADMIN_USER and ADMIN_PASSWORD in the companion OpenSwitch configuration file.

companion_name is a static parameter, while admin_user and admin_password are dynamic parameters. This means that after an OpenSwitch server starts running, you can change the companion’s admin_user and admin_password using rp_cfg and the changes take effect immediately. However, if you change companion_name, you must restart the OpenSwitch server for the change to take effect.

NoteIf USERNAME_PASSWORD_ENCRYPTED is set to 1, admin_user and admin_password should contain the encrypted string (as should ADMIN_USER and ADMIN_PASSWORD in the OpenSwitch configuration file). Use the -E or -p command line options for encryption. See “Using encrypted user names and passwords”.