10.2. Failover

10.2.1. Troubleshooting a Failover
10.2.2. After a Failover the Primary Host is Not Configured

10.2.1. Troubleshooting a Failover

A failover is triggered when the Oracle VDI service on the database replication host fails to access the database on the master database host. If the Oracle VDI Center contains more than two hosts, the replication database host must also be able to contact one other host and that host must also report that it failed to access the master database.

Warning

In the event of an issue after a failover:

  • Do not reboot a host, especially the master database host, in an attempt to resolve the issue.

  • Do not use the vda-config command to add or remove unresponsive hosts from the Oracle VDI Center.

After a failover, first check the status of the Oracle VDI Center. Run the following command as root on every host:

# /opt/SUNWvda/sbin/vda/vda-center status

Check the following:

  • Do all hosts agree on the master database host and replication database host?

    This is shown in the Service column in the output of the vda-center status command.

  • Do all hosts agree on the status of the database service?

    This is shown in the Service Status column in the output of the vda-center status command.

  • Is any host shown with a host status that is anything other than Up?

    This is shown in the Host Status column in the output of the vda-center status command.

    See Section 8.5.1, “Checking the Status of the Oracle VDI Center” for a description of the possible host statuses.

If there are problems with the database service or inconsistencies between the hosts, identify all the hosts with reported roles in the Oracle VDI Center. Run the following command on every host:

# /opt/SUNWvda/sbin/vda-center getprops \
-p db.master.host,db.replication.host,srs.primary.host

See Section 8.11.1, “Identifying Hosts With a Role in an Oracle VDI Center” for more details.

Use the following information to determine the action that needs to be taken.

Normal Failover

After a normal failover, the original master database host is still the Sun Ray primary server, but it now runs the replication database.

You might want to establish a single primary Oracle VDI host again by performing one of the following actions:

If the failure of the original master database host is permanent, or is taking a long time to resolve, perform the following steps:

  1. Change the Sun Ray primary server.

    Verify that the host is still configured as the Sun Ray primary server, by running the following command as root:

    # /opt/SUNWvda/sbin/vda-center getprops -p srs.primary.host

    If the host is the Sun Ray primary server, configure another host as the Sun Ray primary server, see Section 8.11.8, “Changing the Sun Ray Primary Server”.

  2. Change the replication database host.

    Configure another host to run the replication database so that database high availability is restored, see Section 8.11.4, “Changing the Replication Database Host”.

  3. Restart the Oracle VDI service on the original master database host.

    Run the following command as root:

    # /opt/SUNWvda/sbin/vda-service restart
  4. If the problem persists, remove the host from the Oracle VDI Center.

    See Section 8.11.7, “Removing an Unresponsive Host from an Oracle VDI Center”.

Disagreement About the Master Database Host

After a failover, more than one host might be identified as the master database host. If only one of the hosts reports the master database service as Up, select that host. If the master database service is Up on multiple hosts, select either the master database host that had the best network connectivity during the failover, or the host that is reported as the master database host by the majority of the other hosts in the Oracle VDI Center.

Restart the Oracle VDI service on each host that does not report the selected host as the master database host, by running the following command as root:

# /opt/SUNWvda/sbin/vda-service restart

Only restart the Oracle VDI service on one host at a time, and wait until the host status is Up before restarting the Oracle VDI service on another host.

No Replication Database or Disagreement About the Replication Host

After a failover, if the replication database is not configured, or the replication database host is unavailable, or there is disagreement about the replication database host, perform the following steps:

  1. Clear the replication database host.

    Run the following command as root:

    # /opt/SUNWvda/sbin/vda-center setprops -p db.replication.host=""
  2. Reconfigure the replication database host.

    Run the following command as root:

    # /opt/SUNWvda/sbin/vda-center setprops -p db.replication.host=host
    

No Database At All

In rare circumstances after a failover, the Oracle VDI Center might report there is no master or replication database.

Whenever a failover occurs, Oracle VDI creates an emergency backup of the database in /var/opt/SUNWvda/vdadump.zip.

You can use this backup to restore the database, see Section 8.7.2, “Restoring the Oracle VDI Database” for details.

Hosts With No Role in the Oracle VDI Center

If the host has no reported role in the Oracle VDI Center and the host status is not Up, restart the Oracle VDI service on the host, by running the following command as root:

# /opt/SUNWvda/sbin/vda-service restart

Only restart the Oracle VDI service on one host at a time, and wait until the host status is Up before restarting the Oracle VDI service on another host.

If problems persist, remove the host from the Oracle VDI Center, see Section 8.11.7, “Removing an Unresponsive Host from an Oracle VDI Center”.

10.2.2. After a Failover the Primary Host is Not Configured

Oracle VDI uses several properties to identify a host that has a primary role in an Oracle VDI Center. If you use the vda.primary.host property to monitor the status of your Oracle VDI Center, you might find that this property is empty after a failover.

When a failover occurs, the host that runs the replication database is promoted to run the master database. However, by default the Sun Ray primary server is not changed. If the master database host and the Sun Ray primary server are not the same, the vda.primary.host property is not set.

To reset the vda.primary.host property, perform the following steps:

  1. Identify the master database host and the Sun Ray primary server in an Oracle VDI Center.

    Run the following command as root:

    # /opt/SUNWvda/sbin/vda-center getprops -p db.master.host,srs.primary.host
  2. Reconfigure the Oracle VDI Center so that the master database host and the Sun Ray primary host are the same.

    See either Section 8.11.3, “Changing the Master Database Host” or Section 8.11.8, “Changing the Sun Ray Primary Server”.