Ultramonkey on CentOS 4 with BlueQuartz (part 2)

One of the steps required to configure load-balanced cluster as described here was to create an IP alias on the loopback interface. It is needed so that real servers or standby director could see traffic for the virtual IP address.

But when creating a virtual site using BlueQuartz GUI it automatically adds an alias on primary network interface (eth0 in our case) in addition to the alias we already created manually.

Adding a new virtual site using BlueQuartz

Adding a new virtual site using BlueQuartz

Now every server would be configured to respond to packets for virtual IP address, which could result in unpredictable behavior.

standby# ip addr sh
1: lo:  mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
    inet brd scope global lo
2: eth0:  mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:10:e0:05:20:0d brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
    inet brd scope global secondary eth0:0

If you have completed all the steps to set-up a cluster you should already have fallback interface alias defined in /etc/sysconfig/network-scripts/ifcfg-lo:0. We no longer need BlueQuartz to manage virtual IP address for us.

In order to prevent BlueQuartz from doing that the following files have to be modified:

# handle ip address change
if ($vsite_new->{ipaddr})
    # make sure that there is a network interface for the new ip
#    vsite_add_network_interface($cce, $vsite_new->{ipaddr});
    # delete the old interface, this is a no op if another site is using the old ip still
    vsite_del_network_interface($cce, $vsite_old->{ipaddr});
} # end of ip address change specific
# make sure there is a network interface for this ip
#vsite_add_network_interface($cce, $vsite->{ipaddr});

This way when you add or modify a virtual site assigned to virtual IP address, BlueQuartz won’t add its address to one of the network interfaces because we already took care of it.

Related posts

Leave a Reply

Your email address will not be published.