On 2007-06-04T15:43:03, Michael Dengler <[EMAIL PROTECTED]> 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
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems