cibadmin8
Part of the pacemaker cluster resource manager
Usage
cibadmin <command>
[options]
Overview
query and edit the Pacemaker configuration
Options
Help Options:
-
-h, --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
-cis 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
-
-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 for more details on scores, including how they are 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:
-
# cibadmin --query
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:
Releases
8 releases since Debian 5.0 (Lenny); the text changed 7 times.
-$ since Debian 7 (Wheezy);
--allow-create since Debian 7 (Wheezy);
--bump since Debian 7 (Wheezy);
--create since Debian 7 (Wheezy);
--delete since Debian 7 (Wheezy);
--delete-all since Debian 7 (Wheezy);
--empty since Debian 7 (Wheezy);
--erase since Debian 7 (Wheezy);
--force since Debian 13 (Trixie);
--help-additional since Debian 13 (Trixie);
--help-all since Debian 13 (Trixie);
--help-commands since Debian 13 (Trixie);
--help-data since Debian 13 (Trixie);
--md5-sum since Debian 7 (Wheezy);
--md5-sum-versioned since Debian 7 (Wheezy);
--modify since Debian 7 (Wheezy);
--no-children since Debian 7 (Wheezy);
--node since Debian 7 (Wheezy);
--node-path since Debian 9 (Stretch);
--patch since Debian 7 (Wheezy);
--query since Debian 7 (Wheezy);
--replace since Debian 7 (Wheezy);
--scope since Debian 7 (Wheezy);
--score since Debian 13 (Trixie);
--show-access since Debian 12 (Bookworm);
--timeout since Debian 7 (Wheezy);
--upgrade since Debian 7 (Wheezy);
--user since Debian 9 (Stretch);
--version since Debian 7 (Wheezy);
--xml-file since Debian 7 (Wheezy);
--xml-pipe since Debian 13 (Trixie);
--xml-text since Debian 7 (Wheezy);
--xpath since Debian 7 (Wheezy);
-5 since Debian 7 (Wheezy);
-6 since Debian 7 (Wheezy);
-A since Debian 7 (Wheezy);
-B since Debian 7 (Wheezy);
-C since Debian 7 (Wheezy);
-D since Debian 7 (Wheezy);
-E since Debian 7 (Wheezy);
-M since Debian 7 (Wheezy);
-N since Debian 7 (Wheezy);
-P since Debian 7 (Wheezy);
-Q since Debian 7 (Wheezy);
-R since Debian 7 (Wheezy);
-S since Debian 12 (Bookworm);
-U since Debian 9 (Stretch);
-V since Debian 7 (Wheezy);
-X since Debian 7 (Wheezy);
-a since Debian 7 (Wheezy);
-c since Debian 7 (Wheezy);
-d since Debian 7 (Wheezy);
-e since Debian 9 (Stretch);
-f since Debian 13 (Trixie);
-h since Debian 13 (Trixie);
-n since Debian 7 (Wheezy);
-o since Debian 7 (Wheezy);
-p since Debian 13 (Trixie);
-s since Debian 7 (Wheezy);
-t since Debian 7 (Wheezy);
-u since Debian 7 (Wheezy);
-x since Debian 7 (Wheezy).
--cib_bump until Debian 6.0 (Squeeze);
--cib_create until Debian 6.0 (Squeeze);
--cib_delete until Debian 6.0 (Squeeze);
--cib_delete_alt until Debian 6.0 (Squeeze);
--cib_erase until Debian 6.0 (Squeeze);
--cib_ismaster until Debian 6.0 (Squeeze);
--cib_master until Debian 6.0 (Squeeze);
--cib_modify until Debian 6.0 (Squeeze);
--cib_query until Debian 6.0 (Squeeze);
--cib_replace until Debian 6.0 (Squeeze);
--cib_slave until Debian 6.0 (Squeeze);
--cib_sync until Debian 6.0 (Squeeze);
--cib_update until Debian 6.0 (Squeeze);
--force_quorum until Debian 6.0 (Squeeze);
--local until Debian 12 (Bookworm);
--no-bcast until Debian 6.0 (Squeeze);
--sync until Debian 7 (Wheezy);
--xml_pipe until Debian 6.0 (Squeeze);
-? until Debian 12 (Bookworm);
-l until Debian 12 (Bookworm).