LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Adding a resource to haresources:

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Adding a resource to haresources:
From: Horms <horms@xxxxxxxxxxxx>
Date: Fri, 18 Nov 2005 03:53:35 +0000 (UTC)
Vijay K <vijay_k@xxxxxxxxxxxxx> wrote:
> have a load balancing setup working fine.
>    Now when the swithover happens I need another resource to be taken over
> by
>    the director that is going become master.
>    Here I am facing a problem,I added the resource script in
>    /etc/ha.d/resource.d/. and an entry in haresources.
>    After this it so happens that when I want to stop the heartbeat in the
>    active master machine so that the other machine takesover I am unable to
>    stop it.If I remove this entry in haresources everything is working
>    perfectly fine but when I add the I am facing this problem.
>    Right now my haresources file has two virtual ips, cluster name and
>    ldirectord and all these services are switching over perfectly.When I
> add
>    this new service which was developed by me I am facing this problem.
>    Is there any special ways to be adhered to when a new resource is to be
>    added.
>    Can somebody advice me on how to go about adding this new resource to
>    haresources and make it work.
>    Here is what my haresource file looks like :
>    Clustername  IPaddr::10.10.30.30 IPaddr::10.10.33.33 ldirectord::www
> 
> - Ignored:
>    monitorfes
> 
>    Monitorfes is the new resource I want to be taken over and the
>    /etc/ha.d/resource.d/monitorfes file looks like
> 
>    case $1 in
>            start)  pkill lbmonitor >/dev/null 2>&1
>                    lbmonitor CLIENT 10.10.30.36
>                    exit 0;
>                    ;;
>            stop)   pkill lbmonitor >/dev/null 2>&1
>                    lbmonitor SERVER 10.10.30.36
>                    exit 0;
>                    ;;
>    esac
>    exit 1
> 
> 
>    Is there something wrong in the script. Lbmonitor is the daemon process
> that
>    will b called here

Look at IPaddr as an example, and make sure you implement
each action (start, stop, status...) in an idempotent way.
That is, running a comand many times should be the same as 
running it once.

-- 
Horms


<Prev in Thread] Current Thread [Next in Thread>