PACEMAKER(8) | System Administration Utilities | PACEMAKER(8) |
NAME¶
Pacemaker - Part of the Pacemaker cluster resource manager
SYNOPSIS¶
cibadmin <command> [options]
DESCRIPTION¶
query and edit the Pacemaker configuration
OPTIONS¶
Help Options:¶
- -?, --help
- Show help options
- --help-all
- Show all help options
- --help-commands
- Show command help
- --help-data
- Show data help
- --help-additional
- Show additional options
Commands:¶
- -u, --upgrade
- Upgrade the configuration to the latest syntax
- -Q, --query
- Query the contents of the CIB
- -E, --erase
- Erase the contents of the whole CIB
- -B, --bump
- Increase the CIB's epoch value by 1
- -C, --create
- Create an object in the CIB (will fail if object already exists)
- -M, --modify
- Find object somewhere in CIB's XML tree and update it (fails if object does not exist unless -c is also specified)
- -P, --patch
- Supply an update in the form of an XML diff (see crm_diff(8))
- -R, --replace
- Recursively replace an object in the CIB
- -D, --delete
- Delete first object matching supplied criteria (for example, <op id="rsc1_op1" name="monitor"/>). The XML element name and all attributes must match in order for the element to be deleted.
- -d, --delete-all
- When used with --xpath, remove all matching objects in the configuration instead of just the first one
- -a, --empty=[schema]
- Output an empty CIB. Accepts an optional schema name argument to use as the validate-with value. If no schema is given, the latest will be used.
- -5, --md5-sum
- Calculate the on-disk CIB digest
- -6, --md5-sum-versioned
- Calculate an on-the-wire versioned CIB digest
Data:¶
- -X, --xml-text=value
- Retrieve XML from the supplied string
- -x, --xml-file=value
- Retrieve XML from the named file
- -p, --xml-pipe
- Retrieve XML from stdin
Additional Options:¶
- -f, --force
- Force the action to be performed
- -t, --timeout=value
- Time (in seconds) to wait before declaring the operation failed
- -U, --user=value
- Run the command with permissions of the named user (valid only for the root and hacluster accounts)
- -s, --sync-call
- Wait for call to complete before returning
- -l, --local
- Command takes effect locally (should be used only for queries)
- -o, --scope=value
- Limit scope of operation to specific section of CIB Valid values: configuration, nodes, resources, constraints, crm_config, rsc_defaults,
- op_defaults, acls, fencing-topology, tags, alerts, status
- If both --scope/-o and --xpath/-a are specified, the last one to appear takes effect
- -A, --xpath=value
- A valid XPath to use instead of --scope/-o If both --scope/-o and --xpath/-a are specified, the last one to appear takes effect
- -e, --node-path
- When performing XPath queries, return paths of any matches found (for example, "/cib/configuration/resources/clone[@id='dummy-clone']/primitive[@id='dummy']")
- -S, --show-access=[value]
- Whether to use syntax highlighting for ACLs (with -Q/--query and -U/--user) Allowed values: 'color' (default for terminal), 'text' (plain text, default for non-terminal),
- 'namespace', or 'auto' (use default value)
- Default value: 'auto'
- --score
- Treat new attribute values as atomic score updates where possible (with --modify/-M). This currently happens by default and cannot be disabled, but this default behavior is deprecated and will be removed in a future release. Set this flag if this behavior is desired. This option takes effect when updating XML attributes. For an attribute named "name", if the new value is "name++" or "name+=X" for some score X, the new value is set as follows: If attribute "name" is not already set to some value in the element being updated, the new value is set as a literal string. If the new value is "name++", then the attribute is set to its existing value (parsed as a score) plus 1. If the new value is "name+=X" for some score X, then the attribute is set to its existing value plus X, where the existing value and X are parsed and added as scores. Scores are integer values capped at INFINITY and -INFINITY. Refer to Pacemaker Explained and to the char2score() function for more details on scores, including how they're parsed and added.
- -c, --allow-create
- (Advanced) Allow target of --modify/-M to be created if it does not exist
- -n, --no-children
- (Advanced) When querying an object, do not include its children in the result
- -N, --node=value
- (Advanced) Send command to the specified host
Application Options:¶
- -$, --version
- Display software version and exit
- -V, --verbose
- Increase debug output (may be specified multiple times)
EXAMPLES¶
Query the configuration from the local node:
- # cibadmin --query --local
Query just the cluster options configuration:
- # cibadmin --query --scope crm_config
Query all 'target-role' settings:
- # cibadmin --query --xpath "//nvpair[@name='target-role']"
Remove all 'is-managed' settings:
- # cibadmin --delete-all --xpath "//nvpair[@name='is-managed']"
Remove the resource named 'old':
- # cibadmin --delete --xml-text '<primitive id="old"/>'
Remove all resources from the configuration:
- # cibadmin --replace --scope resources --xml-text '<resources/>'
Replace complete configuration with contents of $HOME/pacemaker.xml:
- # cibadmin --replace --xml-file $HOME/pacemaker.xml
Replace constraints section of configuration with contents of $HOME/constraints.xml:
- # cibadmin --replace --scope constraints --xml-file $HOME/constraints.xml
Increase configuration version to prevent old configurations from being loaded accidentally:
- # cibadmin --modify --score --xml-text '<cib admin_epoch="admin_epoch++"/>'
Edit the configuration with your favorite $EDITOR:
- # cibadmin --query > $HOME/local.xml
- # $EDITOR $HOME/local.xml
- # cibadmin --replace --xml-file $HOME/local.xml
Assuming terminal, render configuration in color (green for writable, blue for readable, red for denied) to visualize permissions for user tony:
- # cibadmin --show-access=color --query --user tony | less -r
SEE ALSO:¶
- crm(8), pcs(8), crm_shadow(8), crm_diff(8)
AUTHOR¶
Written by Andrew Beekhof and the Pacemaker project contributors
October 2024 | Pacemaker 2.1.8+20240808.3980678f03-1.2 |