Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

crm_attribute(8) [suse man page]

CRM_ATTRIBUTE(8)						  [FIXME: manual]						  CRM_ATTRIBUTE(8)

NAME
crm_attribute - manipulate attributes in the CIB SYNOPSIS
crm_attribute [options] DESCRIPTION
The crm_attribute command queries and manipulates node attributes and cluster configuration options that are used in the CIB. OPTIONS
--help, -? Print a help message. --verbose, -V Turn on debug information. Note Increase the level of verbosity by providing additional instances. --quiet, -Q When doing an attribute query using -G, print just the value to stdout. Use this option with -G. --get-value, -G Retrieve rather than set the preference. --delete-attr, -D Delete rather than set the attribute. --attr-value string, -v string Value to set. This is ignored when used with -G. --node-uuid node_uuid, -u node_uuid Specify the UUID of the node to change. --node-uname node_uname, -U node_uname Specify the uname of the node to change. --set-name string, -s string Specify the set of attributes in which to read or write the attribute. --attr-name string, -n string Specify the attribute to set or query. --type string, -t type Determine to which section of the CIB the attribute should be set or to which section of the CIB the attribute that is queried belongs Possible values are nodes, status, or crm_config. Additional Options: +-----------+--------------------+ |Type | Additional Options | +-----------+--------------------+ |nodes | -(U|u) -n [-s] | +-----------+--------------------+ |status | -(U|u) -n [-s] | +-----------+--------------------+ |crm_config | -n [-s] | +-----------+--------------------+ EXAMPLES
Query the value of the location attribute in the nodes section for the host myhost in the CIB: crm_attribute -G -t nodes -U myhost -n location Query the value of the cluster-delay attribute in the crm_config section in the CIB: crm_attribute -G -t crm_config -n cluster-delay Query the value of the cluster-delay attribute in the crm_config section in the CIB. Print just the value: crm_attribute -G -Q -t crm_config -n cluster-delay Delete the location attribute for the host myhost from the nodes section of the CIB: crm_attribute -D -t nodes -U myhost -n location Add a new attribute called location with the value of office to the set subsection of the nodes section in the CIB (settings applied to the host myhost): crm_attribute -t nodes -U myhost -s set -n location -v office Change the value of the location attribute in the nodes section for the myhost host: crm_attribute -t nodes -U myhost -n location -v backoffice FILES
/var/lib/heartbeat/crm/cib.xml--the CIB (minus status section) on disk. Editing this file directly is strongly discouraged. SEE ALSO
??? AUTHOR
crm_attribute was written by Andrew Beekhof. [FIXME: source] 07/05/2010 CRM_ATTRIBUTE(8)

Check Out this Related Man Page

PACEMAKER(8)						  System Administration Utilities					      PACEMAKER(8)

NAME
Pacemaker - Part of the Pacemaker cluster resource manager SYNOPSIS
cibadmin command [options] [data] DESCRIPTION
cibadmin - Provides direct access to the cluster configuration. Allows the configuration, or sections of it, to be queried, modified, replaced and deleted. Where necessary, XML data will be obtained using the -X, -x, or -p options OPTIONS
-?, --help This text -$, --version Version information -V, --verbose Increase debug output 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 the object already exists. -M, --modify Find the object somewhere in the CIB's XML tree and update it. Fails if the object does not exist unless -c is specified -P, --patch Supply an update in the form of an xml diff (See also: crm_diff) -R, --replace Recursivly replace an object in the CIB -D, --delete Delete the first object matching the supplied criteria, Eg. <op id="rsc1_op1" name="monitor"/> The tagname 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 -5, --md5-sum Calculate the on-disk CIB digest -6, --md5-sum-versioned Calculate an on-the-wire versioned CIB digest -S, --sync (Advanced) Force a refresh of the CIB to all nodes -a, --empty Output an empty CIB Additional options: -f, --force -t, --timeout=value Time (in seconds) to wait before declaring the operation failed -s, --sync-call Wait for call to complete before returning -l, --local Command takes effect locally. Should only be used for queries -c, --allow-create (Advanced) Allow the target of a -M operation to be created if they do not exist -n, --no-children (Advanced) When querying an object, do not return include its children in the result 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 -A, --xpath=value A valid XPath to use instead of -o -o, --scope=value Limit the scope of the operation to a specific section of the CIB. Valid values are: nodes, resources, constraints, crm_config, rsc_defaults, op_defaults, status -N, --node=value (Advanced) Send command to the specified host EXAMPLES
Query the configuration from the local node: # cibadmin --query --local Query the 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 the complete configuration with the contents of $HOME/pacemaker.xml: # cibadmin --replace --xml-file $HOME/pacemaker.xml Replace the constraints section of the configuration with the contents of $HOME/constraints.xml: # cibadmin --replace --scope constraints --xml-file $HOME/constraints.xml Increase the configuration version to prevent old configurations from being loaded accidentally: # cibadmin --modify --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 SEE ALSO: CRM shell, crm(8), crm_shadow(8) AUTHOR
Written by Andrew Beekhof REPORTING BUGS
Report bugs to pacemaker@oss.clusterlabs.org Pacemaker 1.1.7 April 2012 PACEMAKER(8)
Man Page