Activating the Failover Node

Activating the failover node on a involves these three steps at a high level:
gateway83
Activating the failover node on a
API Gateway
involves these three steps at a high level:
  1. Log in to the Disaster Recovery (DR) node.
  2. Stop replication.
  3. Activate the node.
Once the node is activated, you can route traffic to it.
In this topic, the two nodes in the cluster are referred to as 
Gateway1
 and 
Gateway2,
where
 Gateway1
is the database node hosting the primary database. The DR node being configured is referred to as
Gateway-DR.
It is very important that the slave on the DR node is disabled. This is a precaution, should the database on Gateway2 inadvertently come back up.
To activate the failover node:
  1. Access the privileged shell on Gateway-DR.
  2. Stop the database from slaving the secondary node:
    #
    mysqladmin stop-slave
    Slave stopped
    #
    mysql -e "SHOW SLAVE STATUS\G" | grep Running
    Slave_IO_Running: No
    Slave_SQL_Running: No
  3. (Optional) Disable replication monitoring in crontab:
    crontab -e
    # Monitor DR database replication
    #
    0 * * * * /usr/local/bin/monitor_replication.sh
  4. Exit the privileged shell and return to the Gateway main menu.
  5. Select the following options:
    2
    ( Display CA API Gateway Configuration menu),
    3
    (Configure the CA API Gateway),
    4
    (Node Configuration). 
  6. Enter
    yes
    to enable the node.
  7. Select
    S
    (Save and exit). You are presented with a summary of the configuration that will be applied:
    ---------------------
    Configuration Summary
    ---------------------
    Press < to go to the previous step, type "quit" to quit.
    The following configuration will be applied:
      Database Connection
        Database Host = localhost
        Database Port = 3306
        Database Name = ssg
        Database Username = gateway
      Node Configuration
        Enabled = Yes
    Press [Enter] to continue.
  8. Review the summary carefully and then press
    Enter
    to apply the configuration. This may take a moment to complete.
  9. Upon completion, press
    Enter
    to return to the Gateway Configuration menu
  10. Select option
    7
    (Manage CA API Gateway status) to check state of the Gateway startup. If it is not running, exit back to the menu and wait, then select option 7 again. When you see
    Node Status = RUNNING
    , proceed to the next step.
  11. Exit the Gateway main menu and confirm that the Policy Manager can connect to the DR node directly.
  12. Configure the network routing infrastructure to route messages to the DR system.