1
2FENCE_AGENT(8)              System Manager's Manual             FENCE_AGENT(8)
3
4
5

NAME

7       fence_apc - Fence agent for APC over telnet/ssh
8

DESCRIPTION

10       fence_apc  is  an I/O Fencing agent which can be used with the APC net‐
11       work power switch. It logs into device via telnet/ssh   and  reboots  a
12       specified  outlet.  Lengthy  telnet/ssh  connections  should be avoided
13       while a GFS cluster  is  running  because  the  connection  will  block
14       any necessary fencing actions.
15
16       fence_apc  accepts  options  on the command line as well as from stdin.
17       Fenced  sends  parameters  through  stdin  when  it  execs  the  agent.
18       fence_apc can be run by itself with command line options.  This is use‐
19       ful for testing and for turning outlets on or off from scripts.
20
21       Vendor URL: http://www.apc.com
22

PARAMETERS

24
25
26       -o, --action=[action]
27              Fencing action (Default Value: reboot)
28
29       -c, --command-prompt=[prompt]
30              Force Python regex for  command  prompt  (Default  Value:  ['0',
31              '0pc>'])
32
33       -k, --identity-file=[filename]
34              Identity file (private key) for SSH
35
36       -4, --inet4-only
37              Forces agent to use IPv4 addresses only
38
39       -6, --inet6-only
40              Forces agent to use IPv6 addresses only
41
42       -a, --ip=[ip]
43              IP  address  or hostname of fencing device This parameter is al‐
44              ways required.
45
46       -u, --ipport=[port]
47              TCP/UDP port to use for connection with device  (Default  Value:
48              23)
49
50       -p, --password=[password]
51              Login password or passphrase
52
53       -S, --password-script=[script]
54              Script to run to retrieve password
55
56       -n, --plug=[id]
57              Physical  plug  number  on device, UUID or identification of ma‐
58              chine This parameter is always required.
59
60       -x, --ssh
61              Use SSH connection
62
63       --ssh-options=[options]
64              SSH options to use (Default Value: -1 -c blowfish)
65
66       -s, --switch=[id]
67              Physical switch number on device
68
69       -l, --username=[name]
70              Login name This parameter is always required.
71
72       -q, --quiet
73              Disable logging to stderr. Does not affect --verbose or --debug-
74              file or logging to syslog.
75
76       -v, --verbose
77              Verbose  mode.  Multiple  -v flags can be stacked on the command
78              line (e.g., -vvv) to increase verbosity.
79
80       --verbose-level
81              Level of debugging detail in output. Defaults to the  number  of
82              --verbose  flags  specified on the command line, or to 1 if ver‐
83              bose=1 in a  stonith  device  configuration  (i.e.,  on  stdin).
84
85
86       -D, --debug-file=[debugfile]
87              Write debug information to given file
88
89       -V, --version
90              Display version information and exit
91
92       -h, --help
93              Display help and exit
94
95       -C, --separator=[char]
96              Separator for CSV created by 'list' operation (Default Value: ,)
97
98
99       --delay=[seconds]
100              Wait X seconds before fencing  is  started  (Default  Value:  0)
101
102
103       --disable-timeout=[true/false]
104              Disable  timeout (true/false) (default: true when run from Pace‐
105              maker 2.0+)
106
107       --login-timeout=[seconds]
108              Wait X seconds for cmd prompt after  login  (Default  Value:  5)
109
110
111       --power-timeout=[seconds]
112              Test  X  seconds  for status change after ON/OFF (Default Value:
113              20)
114
115       --power-wait=[seconds]
116              Wait X seconds after issuing ON/OFF (Default Value: 0)
117
118       --shell-timeout=[seconds]
119              Wait X seconds for cmd prompt  after  issuing  command  (Default
120              Value: 3)
121
122       --stonith-status-sleep=[seconds]
123              Sleep  X  seconds  between  status calls during a STONITH action
124              (Default Value: 1)
125
126       --retry-on=[attempts]
127              Count of attempts to retry power on (Default Value: 1)
128
129       --ssh-path=[path]
130              Path to ssh binary (Default Value: /usr/bin/ssh)
131
132       --telnet-path=[path]
133              Path to telnet binary (Default Value: /usr/bin/telnet)
134
135

ACTIONS

137
138
139       on     Power on machine.
140
141       off    Power off machine.
142
143       reboot Reboot machine.
144
145       status This returns the status of the plug/virtual machine.
146
147       list   List available plugs with aliases/virtual machines if  there  is
148              support for more then one device. Returns N/A otherwise.
149
150       list-status
151              List  available  plugs  with  aliases/virtual machines and their
152              power state if it can be obtained without  additional  commands.
153
154
155       monitor
156              Check the health of fence device
157
158       metadata
159              Display the XML metadata describing this resource.
160
161       manpage
162               The operational behavior of this is not known.
163
164       validate-all
165              Validate if all required parameters are entered.
166
167

STDIN PARAMETERS

169
170
171       action Fencing action (Default Value: reboot)
172
173       command_prompt
174              Force  Python  regex  for  command  prompt (Default Value: ['0',
175              '0pc>']) Obsoletes: cmd_prompt
176
177       identity_file
178              Identity file (private key) for SSH
179
180       inet4_only
181              Forces agent to use IPv4 addresses only
182
183       inet6_only
184              Forces agent to use IPv6 addresses only
185
186       ip     IP address or hostname of fencing device This parameter  is  al‐
187              ways required. Obsoletes: ipaddr
188
189       ipport TCP/UDP  port  to use for connection with device (Default Value:
190              23)
191
192       password
193              Login password or passphrase Obsoletes: passwd
194
195       password_script
196              Script to run  to  retrieve  password  Obsoletes:  passwd_script
197
198
199       plug   Physical  plug  number  on device, UUID or identification of ma‐
200              chine This parameter is always required. Obsoletes:  port
201
202
203       ssh    Use SSH connection Obsoletes: secure
204
205       ssh_options
206              SSH options to use (Default Value: -1 -c blowfish)
207
208       switch Physical switch number on device
209
210       username
211              Login  name  This parameter is always required. Obsoletes: login
212
213
214       quiet  Disable logging to stderr. Does not affect --verbose or --debug-
215              file or logging to syslog.
216
217       verbose
218              Verbose  mode.  Multiple  -v flags can be stacked on the command
219              line (e.g., -vvv) to increase verbosity.
220
221       verbose_level
222              Level of debugging detail in output. Defaults to the  number  of
223              --verbose  flags  specified on the command line, or to 1 if ver‐
224              bose=1 in a  stonith  device  configuration  (i.e.,  on  stdin).
225
226
227       debug_file
228              Write debug information to given file Obsoletes: debug
229
230       version
231              Display version information and exit
232
233       help   Display help and exit
234
235       separator
236              Separator for CSV created by 'list' operation (Default Value: ,)
237
238
239       delay  Wait X seconds before fencing  is  started  (Default  Value:  0)
240
241
242       disable_timeout
243              Disable  timeout (true/false) (default: true when run from Pace‐
244              maker 2.0+)
245
246       login_timeout
247              Wait X seconds for cmd prompt after  login  (Default  Value:  5)
248
249
250       power_timeout
251              Test  X  seconds  for status change after ON/OFF (Default Value:
252              20)
253
254       power_wait
255              Wait X seconds after issuing ON/OFF (Default Value: 0)
256
257       shell_timeout
258              Wait X seconds for cmd prompt  after  issuing  command  (Default
259              Value: 3)
260
261       stonith_status_sleep
262              Sleep  X  seconds  between  status calls during a STONITH action
263              (Default Value: 1)
264
265       retry_on
266              Count of attempts to retry power on (Default Value: 1)
267
268       ssh_path
269              Path to ssh binary (Default Value: /usr/bin/ssh)
270
271       telnet_path
272              Path to telnet binary (Default Value: /usr/bin/telnet)
273
274
275
276fence_apc (Fence Agent)           2009-10-20                    FENCE_AGENT(8)
Impressum