[Engine-devel] Custom fencing

Eli Mesika emesika at redhat.com
Sat Feb 1 21:48:49 UTC 2014



----- Original Message -----
> From: "Kristof Dufour" <kristof at dcin.be>
> To: engine-devel at ovirt.org
> Sent: Saturday, February 1, 2014 11:46:45 AM
> Subject: [Engine-devel] Custom fencing
> 
> Hi All,
> 
> I have a PDU that allows me to switch on or off all my servers, however
> the brand isn¹t supported by oVirt.
> 
> 1. Can I create my own custom fencing script?
> 2. Where can I find any documentation about the syntax?
> 3. How can I get my script in the list of fencing methods?
> 
> 
> Hope that anyone can help me!


Here are detailed instructions how to add a custom agent:

Before you start

1) Copy your script to all hosts /usr/sbin directory , your script must be named as fence_<agent name>
2) Your script must support the following parameters 
  -a <ipaddr>    IP to talk to
  -l <login>     Username/Login to control power
  -p <password>  Password to control power
3) Make sure that your script has the same permissions as other fence_* scripts 

In addition you should know if your script support secure/port/slot and which are the actual parameters for each 
(You may pass any other script parameters in the options field as a collection of key=value pairs with comma separator between them)

Now for the changs:

a) Add your new agent to VdsFenceType option_value in vdc_options table for the relevant cluster version
b) Add agent options mappings to VdsFenceOptionMapping option_value in vdc_options table for the relevant cluster version
c) If the agent maps actually to another agent , add that to FenceAgentMapping option_value in vdc_options [not required in your case]

Example : Adding zzz agent support for version 3.3 that maps internally to ipmi and have just port setting (from: port, slot, secure) that maps to the fencing script ipport
a) VdsFenceType for 3.3 becomes "apc,apc_snmp,bladecenter,cisco_ucs,drac5,eps,ilo,ilo2,ilo3,ilo4,ipmilan,rsa,rsb,wti,zzz"
b) VdsFenceOptionMapping for 3.3 becomes "apc:secure=secure,port=ipport,slot=port;apc_snmport=port;bladecenter:secure=secure,port=ipport,slot=port;cisco_ucs:secure=ssl,slot=port;drac5:secure=se
cure,slot=port;eps:slot=port;ilo:secure=ssl,port=ipport;ipmilan:;ilo2:secure=ssl,port=ipport;ilo3:;ilo4:;rsa:secure=secure,port=ipport;rsb:;wti:secure=secure,port=ipport,slot=port;zzz:port=ipport"
c) FenceAgentMapping becomes "ilo2=ilo,ilo3=ipmilan,ilo4=ipmilan,zzz=ipmilan" [not required in your case]

NOTES

1) Please backup your database
2) You should restart the engine for this to take place
3) Custom definitions will be overridden in your next upgrade , for the long run please fill RFE so it will be part of the supported agents

Please let me know if that works for you.



> 
> 
> 
> Met vriendelijke groeten,
> With kind regards,
> Kristof Dufour
> 
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
> 



More information about the Devel mailing list