[Linux-HA] Hostname is associated with application state information.

Lars Marowsky-Bree lmb at suse.de
Wed Jun 6 08:08:26 MDT 2007


On 2007-06-04T15:43:03, Michael Dengler <michael.dengler at gmail.com> wrote:

> The application I need to use as an HA resource uses hostname as a part of
> its state information. Since 'hostname' will be different in the  event of a
> failover, the application will get confused and die. Is there any way to get
> around this (aside from modifying the application)?

You could use LD_PRELOAD to overload the gethostname/uname syscalls and
provide the application with the hostname it's expecting.

You could encapsulate the application into a Xen/OpenVZ or other
virtualization mechanism, inside which it has all the required state.
Probably the best choice for such broken apps.

You can write a resource agent to change the hostname of the box
globally; as heartbeat uses the UUID of the node internally, it'll not
get confused by it, but other apps might ...



Regards,
    Lars

-- 
Teamlead Kernel, SuSE Labs, Research and Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde



More information about the Linux-HA mailing list