Antwort: AW: switching packages because of system maintenance
alanr at unix.sh
Wed Oct 23 12:15:18 MDT 2002
Daniel Khan wrote:
> Hi Tobias,
>>thanks for your fast answer. But a restart of heartbeat would affect all
>>packages not only one, so this is not an option. What I mean by package is
>>an IP / package name, filesystems and a service. And I have a lot of
>>packages with more than one resource.
>>I am looking for a possibility to do the same what Heartbeat does, in case
>>of nice_failback off, but for every package itself.
> I am not the big heartbeat crack but I can tell you what I do:
> Have a look at a typical takeover/release procedure on one node (ha-log).
> There you will see the commands heartbeat sends.
> For instance:
> heartbeat: 2002/09/28_00:36:15 info: Running /etc/ha.d/resource.d/IPaddr
> 10.1.0.213 start
> Now if I want to takeover an IP on the other node because of maintenance I
> Node 1:
> /etc/ha.d/resource.d/IPaddr 10.1.0.213 stop
> Node 2:
> /etc/ha.d/resource.d/IPaddr 10.1.0.213 start
> As heartbeat simply runs the resource scripts with start|stop depending on
> a node leaves|takes over you can easily simulate heartbeats behavior with a
> small shellscript which
> runs the resource script like heartbeat does.
> I think you look for a command that soes something like:
> * Acquiring resource group: vie1.webdns.at 10.1.0.214 mirror_VIE1
> * Releasing resource group: vie1.webdns.at 10.1.0.214 mirror_VIE1
> but this seems to be a core feature of heartbeat itself that can't be
> triggered by a simple command.
First of all, if you have a failover while in this condition, heartbeat
will likely be confused about things. Be aware of that.
Secondly, there is a script called ResourceManager which will take over (or
give up) a whole group of resources in proper order.
Thirdly, there is a little script called ip-request which is called to
request resource groups from other machines. When you send an "ip-request"
message to the cluster, then the resources you mentioned in the message will
be given up, and it will send you back an ip-request-resp packet. When an
ip-request-resp packet is received, then it takes over the resource group
mentioned in the packet.
So, if you still want to do this, then send the appropriate "ip-request"
packet out from the machine you want to own the resources, and they will
magically move from whatever machine has them to the machine which sent out
the ip-request packet.
When you get your maintenance done (or whatever), you should reverse the
resource move, or the next automatic failover isn't likely to work.
-- Alan Robertson
alanr at unix.sh
More information about the Linux-HA