Scroll to navigation

PACEMAKER(8) System Administration Utilities PACEMAKER(8)

NAME

Pacemaker - Part of the Pacemaker cluster resource manager

SYNOPSIS

crm_simulate <data source> <operation> [options]

DESCRIPTION

crm_simulate - simulate a Pacemaker cluster's response to events

OPTIONS

Help Options:

Show help options
Show all help options
Show output help
Show operations options
Show synthetic cluster event options
Show artifact options
Show data source options

Output Options:

Specify output format as one of: text (default), xml
Specify file name for output (or "-" for stdout)

Operations:

Process the supplied input and show what actions the cluster will take in response
Like --run, but also simulate taking those actions and show the resulting new status
Like --simulate, but also store the results back to the input file
Show node attributes
Show resource fail counts
Show allocation scores
Show utilization information
Process all the XML files in the named directory to create profiling data
With --profile, repeat each test N times and print timings

Synthetic Cluster Events:

Simulate bringing a node online
Simulate taking a node offline
Simulate a node failing
Generate a failure for the cluster to react to in the simulation. See `Operation Specification` help for more information.
If the specified task occurs during the simulation, have it fail with return code ${rc}. The transition will normally stop at the failed action. Save the result with --save-output and re-run with --xml-file. See `Operation Specification` help for more information.
Set date/time (ISO 8601 format, see https://en.wikipedia.org/wiki/ISO_8601)
Set to '1' (or 'true') to indicate cluster has quorum
Set to '1' (or 'true') to indicate cluster has an active watchdog device
Simulate granting a ticket
Simulate revoking a ticket
Simulate making a ticket standby
Simulate activating a ticket

Artifact Options:

Save the input configuration to the named file
Save the output configuration to the named file
Save the transition graph (XML format) to the named file
Save the transition graph (DOT format) to the named file
Display all possible actions in DOT graph (even if not part of transition)

Data Source:

Connect to CIB manager and use the current CIB contents as input
Retrieve XML from the named file
Retrieve XML from stdin

Application Options:

-$, --version
Display software version and exit
Increase debug output (may be specified multiple times)
Display only essential output

OPERATION SPECIFICATION

The OPSPEC in any command line option is of the form ${resource}_${task}_${interval_in_ms}@${node}=${rc} (memcached_monitor_20000@bart.example.com=7, for example). ${rc} is an OCF return code. For more information on these return codes, refer to https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Administration/html/agents.html#ocf-return-codes

EXAMPLES

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 failed would be:

crm_simulate -S --xml-file /tmp/memcached-test.xml

AUTHOR

Written by Andrew Beekhof and the Pacemaker project contributors

October 2024 Pacemaker 2.1.8+20240808.3980678f03-1.2