![]() |
|||
![]() |
![]() ![]() |
![]() |
![]() ![]() |
![]() |
![]() ![]() |
![]() |
| ||
You can trigger a failover by calling the cmm_member_setqualif() function from the master node. For more information, see Triggering a Failover by Using the cmm_member_setqualif()Function. Triggering A SwitchoverA switchover is usually triggered by the system administrator for maintenance of a node. There are two ways to trigger a switchover: For information about the nhcmmstat tool, see the nhcmmstat(1M) man page. Triggering a Switchover Using cmm_mastership_release()The cmm_mastership_release() function enables a calling process to trigger a switchover. This function must be called from the master node. If the vice-master node is qualified to be master when the cmm_mastership_release() function is called, it becomes the master node. If there is no node qualified to become master when the cmm_mastership_release() function is called, the function does not release the mastership from the current master and the function fails. After the cmm_mastership_release() function is called, the calling node remains master until the vice-master node has taken the master role. When this happens, the nhcmmd daemon issues a notification of the switchover. For information about notifications during a switchover, see Switchover Notifications. For more information about the nhcmmd daemon and notifications, see Introduction to Change Notifications. The cmm_mastership_release() call is synchronous, that is, it only returns when the switchover has been completed or has failed, or when a timeout occurs. Example 7-5 demonstrates how to use the cmm_mastership_release() function to trigger a switchover: Example 7-5 Triggering a Switchover by Using the cmm_mastership_release() Function
Note - Do not trigger a switchover with the cmm_mastership_release() function if you are running a separate Netra HA Suite Framework product on your cluster. Triggering A FailoverA failover can be triggered by removing the master node by using the cmm_membership_release() function, or by disqualifying the master node by using the cmm_member_setqualif() function. This section contains information about these topics:
Triggering a Failover by Using the cmm_membership_remove() FunctionThe cmm_membership_remove() function removes from the cluster the node from which the cmm_membership_remove() function is called. If you call this function from the master when the vice-master is synchronized, you trigger a failover. When the cmm_membership_remove() function is called from the master node, the master node stops sending heartbeat information to other nodes in the cluster, which triggers a failover. The notifications sent for this scenario are shown in Failover Due to the Removal or Failure of the Master Node. If there is no vice-master, or the master-eligible nodes are desynchronized, the CMM_ECANCELLED error is returned. If a node is not configured to be in any cluster, any subsequent call to the CMM API returns the CMM_ENOCLUSTER error. For further information about these and other return values, see Return Values of the CMM API. The only way for a removed node to rejoin the cluster is to restart the nhprobed daemon and the CMM service. For further information, see the cmm_membership_remove(3CMM) man page and the nhprobed(1M) man page. An example that demonstrates how to trigger a failover by using the cmm_membership_remove() function is shown in Example 7-6. Example 7-6 Triggering a Failover Using the cmm_membership_remove() Function
| ||
| ||
![]() |