[Linux-cluster] Writing new fencing agent
Marek 'marx' Grac
mgrac at redhat.com
Wed Apr 9 14:32:21 UTC 2008
Hi,
Jonathan Buzzard wrote:
> All good so far. However I am not sure what the requirements of a
> fencing agent are.
> Can I rename my program fence_aol2 fiddle with cluster.conf and it will work?
You have to set 'agent' option:
<fencedevice name="apc" agent="fence_apc" ipaddr="1.1.1.1" login="apc"
passwd="apc"/>
These options will be set to fencing agent on STDIN. Also there is a set
of getopt arguments (look at existing code).
> Does the fencing agent have to return specific exit codes?
You should return 0 when operation was finished succesfully.
> Should the fencing agent do something to test the magic packet of death worked or is simply sending it enough?
All 'standard' fencing agents when rebooting are doing these actions:
1) power off
2) test if the plug/machine is powered off [sometimes it take few seconds]
3) power on
> Does the
> fencing agent need to be able to turn nodes on (I could use Wake On Lan
> for this) as well as off?
>
>
yes, it should.
> Finally once I have a working and debugged AOL2 fencing agent, how does
> one go about submitting for inclusion in cluster suite. Alternatively if
> this is not wanted (Alert on Lan is a historical protocol and superseded
> by IPMI) what is the best way of pointing other users to it's existance?
>
>
You can take a look at new fencing agents (available in git / master
branch). They use a python module for common fencing tasks and it should
not be a problem to write a new fencing agent (agent for APC devices has
3kB). If you will find any problem with new agents don't hesitate and
contact me.
Marek Grac
--
Marek Grac
Red Hat Czech s.r.o.
More information about the Linux-cluster
mailing list