summaryrefslogtreecommitdiffstats
path: root/test/testcases/ra.exp
blob: 5d1573419a3dbbf61e563519ef66ac4cdfc26c50 (plain)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
.TRY RA interface
.INP: ra
.INP: providers IPaddr

heartbeat
.INP: providers Dummy
heartbeat pacemaker
.INP: info ocf:pacemaker:Dummy
.EXT crm_resource --show-metadata ocf:pacemaker:Dummy
Example stateless resource agent (ocf:pacemaker:Dummy)

This is a dummy OCF resource agent. It does absolutely nothing except keep track
of whether it is running or not, and can be configured so that actions fail or
take a long time. Its purpose is primarily for testing, and to serve as a
template for resource agent writers.

Parameters (*: required, []: default):

state (string, [state-file]): State file
    Location to store the resource state in.

passwd (string): Password
    Fake password field

fake (string, [dummy]): 
    Fake attribute that can be changed to cause an agent reload

op_sleep (string, [0]): Operation sleep duration in seconds.
    Number of seconds to sleep during operations.  This can be used to test how
    the cluster reacts to operation timeouts.

fail_start_on (string): Report bogus start failure on specified host
    Start, migrate_from, and reload-agent actions will return failure if running on
    the host specified here, but the resource will run successfully anyway (future
    monitor calls will find it running). This can be used to test on-fail=ignore.

envfile (string): Environment dump file
    If this is set, the environment will be dumped to this file for every call.

Operations' defaults (advisory minimum):

    start         timeout=20s
    stop          timeout=20s
    monitor       timeout=20s interval=10s depth=0
    reload        timeout=20s
    reload-agent  timeout=20s
    migrate_to    timeout=20s
    migrate_from  timeout=20s
.INP: info stonith:external/ssh
.EXT crm_resource --show-metadata stonith:external/ssh
.EXT stonithd metadata
ssh STONITH device (stonith:external/ssh)

ssh-based host reset
Fine for testing, but not suitable for production!
Only reboot action supported, no poweroff, and, surprisingly enough, no poweron.

Parameters (*: required, []: default):

hostlist* (string): Hostlist
    The list of hosts that the STONITH device controls

livedangerously (enum): Live Dangerously!!
    Set to "yes" if you want to risk your system's integrity.
    Of course, since this plugin isn't for production, using it
    in production at all is a bad idea.  On the other hand,
    setting this parameter to yes makes it an even worse idea.
    Viva la Vida Loca!

pcmk_host_argument (string, [port]): Advanced use only: An alternate parameter to supply instead of 'port'
    some devices do not support the standard 'port' parameter or may provide additional ones. Use this to specify an alternate, device-specific, parameter that should indicate the machine to be fenced. A value of none can be used to tell the cluster not to supply any additional parameters.

pcmk_host_map (string): A mapping of host names to ports numbers for devices that do not support host names.
    Eg. node1:1;node2:2,3 would tell the cluster to use port 1 for node1 and ports 2 and 3 for node2

pcmk_host_list (string): Eg. node1,node2,node3
    A list of machines controlled by this device (Optional unless pcmk_host_list=static-list)

pcmk_host_check (string, [dynamic-list]): How to determine which machines are controlled by the device.
    Allowed values: dynamic-list (query the device via the 'list' command), static-list (check the pcmk_host_list attribute), status (query the device via the 'status' command), none (assume every device can fence every machine)

pcmk_delay_max (time, [0s]): Enable a base delay for fencing actions and specify base delay value.
    Enable a delay of no more than the time specified before executing fencing actions. Pacemaker derives the overall delay by taking the value of pcmk_delay_base and adding a random delay value such that the sum is kept below this maximum.

pcmk_delay_base (string, [0s]): Enable a base delay for fencing actions and specify base delay value.
    This enables a static delay for fencing actions, which can help avoid "death matches" where two nodes try to fence each other at the same time. If pcmk_delay_max  is also used, a random delay will be added such that the total delay is kept below that value.This can be set to a single time value to apply to any node targeted by this device (useful if a separate device is configured for each target), or to a node map (for example, "node1:1s;node2:5") to set a different value per target.

pcmk_action_limit (integer, [1]): The maximum number of actions can be performed in parallel on this device
    Cluster property concurrent-fencing=true needs to be configured first.Then use this to specify the maximum number of actions can be performed in parallel on this device. -1 is unlimited.

pcmk_reboot_action (string, [reboot]): Advanced use only: An alternate command to run instead of 'reboot'
    Some devices do not support the standard commands or may provide additional ones.\nUse this to specify an alternate, device-specific, command that implements the 'reboot' action.

pcmk_reboot_timeout (time, [60s]): Advanced use only: Specify an alternate timeout to use for reboot actions instead of stonith-timeout
    Some devices need much more/less time to complete than normal.Use this to specify an alternate, device-specific, timeout for 'reboot' actions.

pcmk_reboot_retries (integer, [2]): Advanced use only: The maximum number of times to retry the 'reboot' command within the timeout period
    Some devices do not support multiple connections. Operations may 'fail' if the device is busy with another task so Pacemaker will automatically retry the operation, if there is time remaining. Use this option to alter the number of times Pacemaker retries 'reboot' actions before giving up.

pcmk_off_action (string, [off]): Advanced use only: An alternate command to run instead of 'off'
    Some devices do not support the standard commands or may provide additional ones.Use this to specify an alternate, device-specific, command that implements the 'off' action.

pcmk_off_timeout (time, [60s]): Advanced use only: Specify an alternate timeout to use for off actions instead of stonith-timeout
    Some devices need much more/less time to complete than normal.Use this to specify an alternate, device-specific, timeout for 'off' actions.

pcmk_off_retries (integer, [2]): Advanced use only: The maximum number of times to retry the 'off' command within the timeout period
    Some devices do not support multiple connections. Operations may 'fail' if the device is busy with another task so Pacemaker will automatically retry the operation, if there is time remaining. Use this option to alter the number of times Pacemaker retries 'off' actions before giving up.

pcmk_on_action (string, [on]): Advanced use only: An alternate command to run instead of 'on'
    Some devices do not support the standard commands or may provide additional ones.Use this to specify an alternate, device-specific, command that implements the 'on' action.

pcmk_on_timeout (time, [60s]): Advanced use only: Specify an alternate timeout to use for on actions instead of stonith-timeout
    Some devices need much more/less time to complete than normal.Use this to specify an alternate, device-specific, timeout for 'on' actions.

pcmk_on_retries (integer, [2]): Advanced use only: The maximum number of times to retry the 'on' command within the timeout period
    Some devices do not support multiple connections. Operations may 'fail' if the device is busy with another task so Pacemaker will automatically retry the operation, if there is time remaining. Use this option to alter the number of times Pacemaker retries 'on' actions before giving up.

pcmk_list_action (string, [list]): Advanced use only: An alternate command to run instead of 'list'
    Some devices do not support the standard commands or may provide additional ones.Use this to specify an alternate, device-specific, command that implements the 'list' action.

pcmk_list_timeout (time, [60s]): Advanced use only: Specify an alternate timeout to use for list actions instead of stonith-timeout
    Some devices need much more/less time to complete than normal.Use this to specify an alternate, device-specific, timeout for 'list' actions.

pcmk_list_retries (integer, [2]): Advanced use only: The maximum number of times to retry the 'list' command within the timeout period
    Some devices do not support multiple connections. Operations may 'fail' if the device is busy with another task so Pacemaker will automatically retry the operation, if there is time remaining. Use this option to alter the number of times Pacemaker retries 'list' actions before giving up.

pcmk_monitor_action (string, [monitor]): Advanced use only: An alternate command to run instead of 'monitor'
    Some devices do not support the standard commands or may provide additional ones.Use this to specify an alternate, device-specific, command that implements the 'monitor' action.

pcmk_monitor_timeout (time, [60s]): Advanced use only: Specify an alternate timeout to use for monitor actions instead of stonith-timeout
    Some devices need much more/less time to complete than normal.\nUse this to specify an alternate, device-specific, timeout for 'monitor' actions.

pcmk_monitor_retries (integer, [2]): Advanced use only: The maximum number of times to retry the 'monitor' command within the timeout period
    Some devices do not support multiple connections. Operations may 'fail' if the device is busy with another task so Pacemaker will automatically retry the operation, if there is time remaining. Use this option to alter the number of times Pacemaker retries 'monitor' actions before giving up.

pcmk_status_action (string, [status]): Advanced use only: An alternate command to run instead of 'status'
    Some devices do not support the standard commands or may provide additional ones.Use this to specify an alternate, device-specific, command that implements the 'status' action.

pcmk_status_timeout (time, [60s]): Advanced use only: Specify an alternate timeout to use for status actions instead of stonith-timeout
    Some devices need much more/less time to complete than normal.Use this to specify an alternate, device-specific, timeout for 'status' actions.

pcmk_status_retries (integer, [2]): Advanced use only: The maximum number of times to retry the 'status' command within the timeout period
    Some devices do not support multiple connections. Operations may 'fail' if the device is busy with another task so Pacemaker will automatically retry the operation, if there is time remaining. Use this option to alter the number of times Pacemaker retries 'status' actions before giving up.

Operations' defaults (advisory minimum):

    start         timeout=20
    stop          timeout=15
    status        timeout=20
    monitor       timeout=20 interval=3600