This file is indexed.

/usr/share/doc/cluster-glue/stonith/README.external is in cluster-glue 1.0.12-7build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
EXTERNAL module for Linux-HA STONITH


This stonith plugin runs an external command written in your favorite
language to shutdown the given host.  The external command should return
a zero exit status after a successful shutdown, or non-zero exit status
for a shutdown failure.  Failures notifications will be sent to syslog.

To create your own external plugin, write a script that supports the
following actions:

	reset
	on			(optional)
	off			(optional)
	gethosts
	status
	getconfignames
	getinfo-devid
	getinfo-devname
	getinfo-devdescr
	getinfo-devurl
	getinfo-xml

and place it in the /usr/lib/stonith/plugins/external directory - the
script must be a regular executable file that is NOT writable by group
or others in order to be recognized as an external plugin.  If the
action requires information to be returned, such as the list of hosts
or config names or any of the getinfo calls, simply write the 
information to stdout.  When complete, return zero to indicate the
action succeeded or non-zero to indicate the action failed.  You can
use the ssh (sh) and riloe (pyhton) scripts already in that directory
as working examples.

To make sure that your external plugin is recognized, run "stonith -L"
and look for its name in the output, something along the lines of:

	external/yourplugin 

To configure the plugin on an R1 (legacy) cluster, add a line similar
to the following to /etc/ha.d/ha.cf:

	stonith external/yourplugin /etc/ha.d/yourplugin.cfg

where /etc/ha.d/yourplugin.cfg contains a single line with all of your
plugin's parameters:

	parm1-value parm2-value ...

Another way to configure the plugin on a legacy cluster is to add a line
similiar to the following to /etc/ha.d/ha.cf instead:

	stonith_host * external/yourplugin parm1-value parm2-value ...

where all of your plugin's parameters are placed at the end of the line.

Please note that all parameters come in to the plugin in name/value
(environment variable) form, but in R1 configurations, they appear as a
list of parameters.  They are ordered in the config file or on the
stonith_host line according to the ordering specified in the output of
the getconfignames operation.

To configure the plugin on an R2 cluster, place lines similar to the
following into the <resources> section of your CIB, which is contained
in /var/lib/heartbeat/crm/cib.xml:

         <clone id="DoFencing">
            <instance_attributes>
               <nvpair name="clone_max" value="2"/>
               <nvpair name="clone_node_max" value="1"/>
            </instance_attributes>
            <primitive id="child_DoFencing" class="stonith" type="external/yourplugin" provider="heartbeat">
               <operations>
                  <op name="monitor" interval="5s" timeout="20s" requires="nothing"/>
                  <op name="start" timeout="20s" requires="nothing"/>
               </operations>
               <instance_attributes>
                  <nvpair name="parm1-name" value="parm1-value"/>
                  <nvpair name="parm2-name" value="parm2-value"/>
		     <!-- ... -->
               </instance_attributes>
            </primitive>
         </clone>

Whatever <nvpair> parameters specified in the <attributes> section of
the CIB are passed to the script as environment variables.  For the
example above, the parameters are passed as parm1-name=parm1-value,
parm2-name=parm2-value and so on.

Additional information can be found at
http://linux-ha.org/wiki/ExternalStonithPlugins.