Pacemaker - Part of the Pacemaker cluster resource manager
crm_simulate datasource operation [additional
options]
crm_simulate - Tool for simulating the cluster's response to
events
- -?, --help
- This text
- -$, --version
- Version information
- -Q, --quiet
- Display only essentialoutput
- -V, --verbose
- Increase debug output
- -R, --run
- Determine the cluster's response to the given configuration and
status
-S, --simulate Simulate the transition's
execution and display the resulting cluster status
-X, --in-place Simulate the transition's
execution and store the result back to the input file
- -s,
--show-scores
- Show allocation scores
-U, --show-utilization Show utilization
information
- -P,
--profile=value
- Run all tests in the named directory to create profiling data
- -u,
--node-up=value
- Bring a node online
- -d,
--node-down=value
- Take a node offline
- -f,
--node-fail=value
- Mark a node as failed
- -i,
--op-inject=value
- Generate a failure for the cluster to react to in the simulation
- Value is of the form ${resource}_${task}_${interval_in_ms}@${node}=${rc}.
Eg. memcached_monitor_20000@bart.example.com=7 For more information on OCF
return codes, refer to:
https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html/Pacemaker_Administration/ch07.html#s-ocf-return-codes
- -F,
--op-fail=value
- If the specified task occurs during the simulation, have it fail with
return code ${rc}
- Value is of the form ${resource}_${task}_${interval_in_ms}@${node}=${rc}.
Eg. memcached_stop_0@bart.example.com=1
- The transition will normally
stop at the failed action.
- Save the result with --save-output and re-run with
--xml-file
- -t,
--set-datetime=value
- Set date/time (ISO 8601 format, see
https://en.wikipedia.org/wiki/ISO_8601)
- -q,
--quorum=value
- Specify a value for quorum
- -w,
--watchdog=value
- Assume a watchdog device is active
- -g,
--ticket-grant=value
- Grant a ticket
- -r,
--ticket-revoke=value
- Revoke a ticket
- -b,
--ticket-standby=value
- Make a ticket standby
- -e,
--ticket-activate=value
- Activate a ticket
Pretend a recurring monitor action found memcached stopped on node
fred.example.com and, during recovery, that the memcached stop action
failed
- # crm_simulate -LS --op-inject
memcached:0_monitor_20000@bart.example.com=7 --op-fail
memcached:0_stop_0@fred.example.com=1 --save-output
/tmp/memcached-test.xml
Now see what the reaction to the stop failure would be
- # crm_simulate -S --xml-file /tmp/memcached-test.xml
Written by Andrew Beekhof
Report bugs to users@clusterlabs.org