8.11. Oracle VDI Centers and Failover

8.11.1. Identifying Hosts With a Role in an Oracle VDI Center
8.11.2. Rebooting the Master Database Host Without Causing a Failover
8.11.3. Changing the Master Database Host
8.11.4. Changing the Replication Database Host
8.11.5. Tuning Automatic Failover
8.11.6. Triggering a Failover Manually
8.11.7. Removing an Unresponsive Host from an Oracle VDI Center
8.11.8. Changing the Sun Ray Primary Server
8.11.9. Synchronizing the Sun Ray Group Signature and Data Store Password

High availability is enabled when you configure an Oracle VDI Center that contains multiple hosts.

If you are using the embedded MySQL database, database high availability is only enabled if there is a functioning replication database host. A failover is triggered if the master database fails. During failover, the host that runs the replication database is automatically promoted to run the master database. When connectivity to the original master database host is restored, it hosts the replication database.

Warning

Do not reboot the master database host as this might trigger a failover. To safely reboot the master database host, see Section 8.11.2, “Rebooting the Master Database Host Without Causing a Failover”.

If you are using a remote MySQL database, database failover is not available and you must make your own provision for database high availability. This is configured outside of Oracle VDI.

Sun Ray Software high availability does not require failover. During a database failover, the Sun Ray primary server is not reconfigured automatically.

If the master database host and the Sun Ray primary server are the same host, that host is traditionally called the Oracle VDI primary host. After a database failover, the Sun Ray primary host can be manually reconfigured in order to maintain the Oracle VDI primary host.

8.11.1. Identifying Hosts With a Role in an Oracle VDI Center

More than one host in an Oracle VDI Center can have a role, as follows:

  • Master database host

    The host that runs the master database for the Oracle VDI Center.

    If you are using a remote MySQL database, the master database host is not set.

    Identification:

    • In Oracle VDI Manager, on the Summary tab for the Oracle VDI Center (under Settings).

    • On the command line:

      #  /opt/SUNWvda/sbin/vda-center getprops -p db.master.host

      Alternatively, use either the vda-db-status or the vda-center status command.

  • Replication database host

    The host that runs the replication database for the Oracle VDI Center.

    If you are using a remote MySQL database, the replication database host is not set.

    Identification:

    • In Oracle VDI Manager, on the Summary tab for the Oracle VDI Center (under Settings).

    • On the command line:

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

      Alternatively, use either the vda-db-status or the vda-center status command.

  • Sun Ray primary server

    The host that is configured as the primary server in the Sun Ray failover group.

    By default, this is the same host as the master database host.

    Identification:

    • Not shown in Oracle VDI Manager.

    • On the command line:

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

      Alternatively, use the /opt/SUNWut/sbin/utreplica -l command.

  • Oracle VDI primary host

    If you are using the embedded MySQL database, the primary host is the host that runs the master database host and is configured as the Sun Ray primary server. If the master database hosts and the Sun Ray primary server are not the same, the Oracle VDI primary host is not set.

    If you are using a remote MySQL database, the Oracle VDI primary host is the same as the Sun Ray primary server by default.

    Identification:

    • Not shown in Oracle VDI Manager.

    • On the command line:

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

8.11.2. Rebooting the Master Database Host Without Causing a Failover

When an Oracle VDI Center loses connectivity to the host that runs the master database, this causes a failover and the host that runs the replication (slave) database is automatically promoted to run the master database.

Perform the following steps to reboot the master database host without causing a failover.

Caution

The Oracle VDI service and Oracle VDI Manager are not be able to operate until the master database host is available again. Users will be unable to access any desktops.

If you are using a remote MySQL database instead of the embedded MySQL Server database, you can safely reboot the primary host because a failover does not occur with remote databases.

Steps

  1. Identify the host that runs the replication database.

    Use either the vda-db-status or the vda-center status command to identify the location of the replication database. In Oracle VDI Manager, this information is shown on the Database tab for the Oracle VDI Center (under Settings).

  2. Stop the Oracle VDI service on the host that runs the replication database.

    On the replication database host, run the following command as root:

    # /opt/SUNWvda/sbin/vda-service stop
  3. Reboot the master database host.

  4. Check that the master database host is available.

    Use either the vda-db-status or the vda-center status command to check the status of the database. In Oracle VDI Manager, this information is shown on the Database tab for the Oracle VDI Center (under Settings). You can do this on any host in the Oracle VDI Center.

  5. Start the Oracle VDI service on the replication database host.

    On the replication database host, run the following command as root:

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

8.11.3. Changing the Master Database Host

If you are using the embedded MySQL Server database, the first host you configure to form an Oracle VDI Center runs the master database. By default, this host is also configured as the Sun Ray primary server in a Sun Ray failover group.

You can change the master database host at any time. When you do this, you should also consider changing the Sun Ray primary server to maintain a single primary host in the Oracle VDI Center.

Whenever you change the Sun Ray Software primary server, it causes a short interruption to Sun Ray services (warm restart) and all Sun Ray Clients are disconnected. This might require users to log in again or unlock their screens.

It is not possible to change the master database host using Oracle VDI Manager.

Command Line Steps

  1. Change the primary host using the vda-center setprops command as root.

    To change the master database host and the Sun Ray primary server, run the following command as root:

    # /opt/SUNWvda/sbin/vda-center setprops -p vda.primary.host=<host>
    

    To change only the master database host, run the following command as root:

    # /opt/SUNWvda/sbin/vda-center setprops -p db.master.host=<host>
    
  2. Check that the change has taken effect using the vda-center command as root.

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

8.11.4. Changing the Replication Database Host

If you are using the embedded MySQL Server database, the primary host in the Oracle VDI Center runs the master database. The first secondary host that is added to the Oracle VDI Center runs the replication (slave) database. Follow these steps, to change the replication database host. To change the host that runs the master database, see Section 8.11.3, “Changing the Master Database Host”.

You can only change the replication database host in Oracle VDI Manager if you log in as root. If root is not configured to be primary administrator, you can only change the replication database host on the command line.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Settings and then select an Oracle VDI Center.

  2. Click the Database tab.

    A list of the hosts in the Oracle VDI Center is displayed.

  3. Select a host and click Activate VDI Database Replication.

    A message is displayed that says the new replication host is activated.

Command Line Steps

  1. Change the replication host using the vda-center setprops command as root.

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

    If you specify an empty <host>, you turn off database replication and high availability.

  2. Check that the change has taken effect using the vda-center command as root.

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

8.11.5. Tuning Automatic Failover

It is possible to adjust the properties for an Oracle VDI Center to tune the automatic failover behavior. The following table lists the available properties and what they control. Use the vda-center getprops and vda-center setprops commands to list and edit these settings.

Table 8.3. Properties for Tuning Automatic Failover

PropertyDescription

db.connection.timeout

The connection timeout in milliseconds for database connections.

The Oracle VDI Service reports a database error to the Oracle VDI Center Agent, if an attempt to connect to the Oracle VDI database takes longer than this timeout.

The default is 1000 milliseconds.

db.failover.timeout

The period of time in seconds that the Oracle VDI Center Agent waits before starting failover.

The Oracle VDI Center Agent monitors the database error reports from the Oracle VDI Service. If database errors are reported continuously for this period of time, the database is considered as failed. If the embedded Oracle VDI MySQL Server database is used, failover is triggered.

The default is 15 seconds.

db.replication.config

Whether the Oracle VDI Center Agent automatically configures database replication.

The permitted values are true or false.

If set to true, the automatic configuration of the replication database on a host takes place when a second host is added to an Oracle VDI Center or a failover is performed.

If set to false, the automatic configuration of the replication database does not take place. High availability is disabled until an administrator manually configures a replication database host, see Section 8.11.4, “Changing the Replication Database Host”. This provides you with more control over the host that is used for the replication database but means that high availability has to be configured manually.

The default is true.

srs.primary.autofailover

Whether the Sun Ray primary server is automatically reconfigured during a failover.

The permitted values are true or false.

If set to true, the host that runs the master database in the Oracle VDI Center is automatically configured as the Sun Ray primary server when a failover is performed. This causes a short interruption to Sun Ray services (warm restart) and all Sun Ray Clients are disconnected. This might require users to log in again or unlock their screens.

If set to false, the Sun Ray primary server is not changed when a failover is performed. The Sun Ray primary server can be changed manually, see Section 8.11.8, “Changing the Sun Ray Primary Server”.

The default is false.


8.11.6. Triggering a Failover Manually

In some circumstances you might want to trigger a failover manually, for example if automatic failover is unsuccessful.

To trigger failover manually, you change the master database host. See Section 8.11.3, “Changing the Master Database Host” for details.

8.11.7. Removing an Unresponsive Host from an Oracle VDI Center

Normally you use the vda-config command to add and remove hosts in an Oracle VDI Center. However if a host becomes unresponsive, you might not be able use this command. In this situation, you can force the removal of the host from the Oracle VDI Center.

Command Line Steps

  1. Check the configuration of the Oracle VDI Center and reconfigure it if needed.

    If the Oracle VDI Center contains multiple hosts, run the following command as root to identify the master database host, the replication database host, and the Sun Ray primary server:

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

    If the unresponsive host is shown in the output of this command, reconfigure the Oracle VDI Center as follows:

  2. Remove the host from the Oracle VDI Center.

    Run the following command as root on any of the remaining hosts in the Oracle VDI Center:

    # /opt/SUNWvda/sbin/vda-center purge <host>
  3. Check that the change has taken effect using the vda-center command as root.

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

8.11.8. Changing the Sun Ray Primary Server

The first host you configure to form an Oracle VDI Center is configured as the Sun Ray primary server in a Sun Ray failover group.

Each Sun Ray server has its own local copy of the Sun Ray data store, which is used to store information such as details about Sun Ray Clients and tokens (smart cards). The Sun Ray primary server has read and write access to the data store, while the Sun Ray secondary servers only have read access. Any changes to the data store are first written on the primary server and the primary then replicates the changes to the secondaries.

If the Sun Ray primary server becomes unavailable, changes to the data store cannot be stored but the overall Sun Ray system continues to work because most Sun Ray operations only require read access to the data store. However, some functions, such as token registration, are not available.

You can change the Sun Ray primary server at any time. When you do this, you should also consider changing the master database host to maintain a single primary host in the Oracle VDI Center (if you are using the embedded MySQL database).

Whenever you change the Sun Ray Software primary server, it causes a short interruption to Sun Ray services (warm restart) and all Sun Ray Clients are disconnected. This might require users to log in again or unlock their screens.

It is not possible to change the primary Sun Ray server using Oracle VDI Manager.

Command Line Steps

  1. Change the Sun Ray primary server.

    To change the master database host and the Sun Ray primary server, run the following command as root:

    # /opt/SUNWvda/sbin/vda-center setprops -p vda.primary.host=<host>
    

    To change only the Sun Ray primary server, run the following command as root:

    # /opt/SUNWvda/sbin/vda-center setprops -p srs.primary.host=<host>
    
  2. Check that the change has taken effect.

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

8.11.9. Synchronizing the Sun Ray Group Signature and Data Store Password

The Sun Ray servers in an Oracle VDI Center have a group signature and a data store password. The group signature and password are created and stored in both the Oracle VDI Center and in the Sun Ray server configuration. The Oracle VDI Center Agent uses these values whenever it adds and removes hosts in the Oracle VDI Center.

It is possible to use the Sun Ray administration tools to change either the group signature or the data store password, but these tools do not update the Oracle VDI Center. If the Oracle VDI Center and the Sun Ray servers are not synchronized, you cannot add hosts to an Oracle VDI Center.

Caution

The following commands display the password and group signature in plain text. For security reasons, ensure that no-one is overlooking you when you run the commands.

  1. (Optional) Synchronize the group signature for the Oracle VDI Center.

    Run the following command as root:

    # echo GroupSignature> | /opt/SUNWvda/sbin/vda-center setprops -s srs.group.signature
    

    Verify that the group signature change has taken effect, run the following command as root on each host in the Oracle VDI Center:

    # cat /etc/opt/SUNWut/gmSignature
  2. (Optional) Synchronize the data store password for the Oracle VDI Center.

    Run the following command as root:

    # echo Password> | /opt/SUNWvda/sbin/vda-center setprops -s srs.password
    

    Verify that the data store password change has taken effect, run the following command as root on each host in the Oracle VDI Center:

    # /opt/SUNWut/sbin/utpw -p
  3. Perform a warm restart of Sun Ray services on each host in the Oracle VDI Center.

    You must perform a warm restart of Sun Ray services in the Oracle VDI Center for changes to either the data store password or the group signature to take effect. A warm restart temporarily disconnects users and might require them to log in again or unlock their screens.

    Run the following command on each host in the Oracle VDI Center as root:

    # /opt/SUNWut/sbin/utstart