Configuration data precedence

Mutually-aware OpenSwitch servers use SQL queries, configuration files, and configuration tables that reside on the Adaptive Servers to communicate with each other and stay in sync about effective pool and server properties.

When a mutually-aware OpenSwitch server (for example, OSW1 with MUTUAL_AWARE set to “1”) starts up, it takes the following steps to retrieve the latest effective pool and server configuration to use for startup:

  1. First, the OpenSwitch server that is being started queries its mutually-aware companion to ascertain all server and pool configuration information.

  2. If the companion OpenSwitch server does not respond, the OpenSwitch server queries the Adaptive Server mutually-aware configuration table for the same server and pool configuration information.

    • If only one Adaptive Server responds, and the query was successful, the primary OpenSwitch server uses the query results to start the OpenSwitch server.

    • If both Adaptive Servers respond, OpenSwitch compares the query results from both of them, and uses the entry with the latest sequence number to start.

  3. If the Adaptive Servers do not respond, the OpenSwitch server starts using its own configuration file.

  4. After all configuration information has been updated and the OpenSwitch server starts, OpenSwitch tries to update its companion OpenSwitch server, and the Adaptive Servers that can be reached, with the latest information. For each Adaptive Server defined with CFG_STORAGE, OpenSwitch spawns a thread to monitor the health of the Adaptive Server and update the Adaptive Server if it comes online.

  5. To ensure that both Adaptive Servers have the same data in their cluster table, each time an Adaptive Server is updated (including through a timer), the update is also carried out in the other Adaptive Server, as long as the other Adaptive Server is running and reachable.

  6. If the cluster table does not exist on a CFG_STORAGE Adaptive Server, OpenSwitch creates the cluster table and populates it with the current information the first time it starts with the CFG_STORAGE Adaptive Server.

When the system administrator or an RCM executes rp_stop, rp_start, or rp_switch on a mutually-aware OpenSwitch server for an entire pool or Adaptive Server, the commands are propagated to the companion OpenSwitch server to be executed on that server as well. If the command fails on the companion OpenSwitch server, an error message is logged.

When the system administrator or an RCM executes rp_server_status or rp_pool_status to SET the status for a pool or Adaptive Server, the mutually-aware OpenSwitch server repeats the command on the companion OpenSwitch server, and records the change in the OpenSwitch configuration table on each CFG_STORAGE Adaptive Server.

If the preceding steps fail, the operation is rolled back and the status of the pool or Adaptive Server is returned to its original state.

NoteCommands such as rp_pool_{add | rem} attrib, rp_pool_{add | rem} server, and rp_pool_cache cannot be propagated to the companion OpenSwitch.