TIBCO Virtual IP Manager

Introduction

This is the TIBCO Virtual IP Manager for AciveSpaces Transactions (AST). The TIBCO Virtual IP Manager maps a virtual IP address to a AST partition.

Please see the enclosed javadoc.

When the partition is active on the current node, the virtual IP address is created. Clients can connect to the virtual IP address and, providing a suitable channel is deployed to process the message, the request is processed.

Network

When the partition is not active on the current node, the virtual IP address is removed.

In the case of a node failure, the virtual IP address will be created on the node hosting the new primary partition and removed from the old host.

Failover

Hence, the virtual IP address should always be available for external clients to connect to, regardless of the actual node hosting the service.

In all cases, AST transparent routing can be used to ensure that the inbound message is processed by the correct node.

Configuration

Configuration is via standard AST configuration (kcs) files. An example is shown below:

//  $Id: virtualip_test1.kcs 3672 2012-11-08 14:32:31Z plord $
// 
// Copyright 2012 TIBCO Software Inc. All rights reserved.
// 

configuration "virtualip1" version "1.0" type "com.tibco.virtualip"
{
   configure com.tibco.virtualip
   {
      IPConfiguration
      {
         // name
         //
         name = "CRM";

         // description
         //
         description = "CRM Virtual IP Address";

         // Virtual IP address for this partition
         //
         ipAddress = "192.168.175.100";

         // Network interface
         //
         networkInterface = "eth0:0";

         // List of nodes
         //
         nodes = { "A", "B", "C" };

         // List of channel services which depend on the virtual IP
         // 
         services = { "Test Service" };

         // ifconfig command
         // default is "sudo /sbin/ifconfig"
         //
         ifconfig = "echo sudo /sbin/ifconfig";

         // ssh command
         // default is "/usr/bin/ssh"
         //
         ssh = "/usr/bin/ssh";

         // arping command
         // default is ""
         //
         arping = "echo sudo /usr/sbin/arping -c 4 -A -I eth0 192.168.175.100";
      };

      IPConfiguration
      {
         // name
         //
         name = "Notify";

         // description
         //
         description = "Notify Virtual IP Address";

         // Virtual IP address for this partition
         //
         ipAddress = "192.168.175.101";

         // Network interface
         //
         networkInterface = "eth0:1";

         // List of nodes
         //
         nodes = { "B", "C", "A" };

         // List of channel services which depend on the virtual IP
         // 
         services = { };

         // ifconfig command
         // default is "sudo /sbin/ifconfig"
         //
         ifconfig = "echo sudo /sbin/ifconfig";

         // ssh command
         // default is "/usr/bin/ssh"
         //
         ssh = "/usr/bin/ssh";

         // arping command
         // default is ""
         //
         arping = "echo sudo /usr/sbin/arping -c 4 -A -I eth0 192.168.175.101";
      };
   };
};

Commands run

When a partition is activated, the following external command is run :-

/bin/ssh oldhost "sudo /sbin/ifconfig eth0:0 down"
sudo /sbin/ifconfig eth0:0 192.168.175.100
sudo /usr/sbin/arping -c 4 -A -I eth0:0 192.168.175.100

(the interface and IP address is taken from configuration)

When a partition is deactivated, the following external command is run :-

sudo /sbin/ifconfig eth0:0 down

Note that sudo will need to be configured since these commands need to be run as user root. An example configuration line from /etc/sudoers is shown below:-

Defaults !requiretty
tibco ALL = NOPASSWD: /sbin/ifconfig, /usr/sbin/arping

Also, the ssh command must be allowed to call remote hosts in the cluster without a password. This involves setting up the users ssh keys correctly - see the ssh documentation for further details.