Scroll to navigation

PACEMAKER(8) System Administration Utilities PACEMAKER(8)

NAME

Pacemaker - Part of the Pacemaker cluster resource manager

SYNOPSIS

crm_attribute -n <attribute> <command> [options]

DESCRIPTION

crm_attribute - query and update Pacemaker cluster options and node attributes

OPTIONS

Help Options:

Show help options
Show all help options
Show output help
Show selecting options
Show command options
Show additional options

Output Options:

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

Selecting attributes:

With -L/--list-options, include advanced and deprecated options in the output. This is always treated as true when --output-as=xml is specified.
(Advanced) Operate on instance of specified attribute with this XML ID
Operate on attribute or option with this name. For queries, this is optional, in which case all matching attributes will be returned.
Operate on all attributes matching this pattern (with -v, -D, or -G)
Operate on node attribute used as promotion score for specified resource, or resource given in OCF_RESOURCE_INSTANCE environment variable if none is specified; this also defaults -l/--lifetime to reboot (normally invoked from an OCF resource agent)
(Advanced) Operate on instance of specified attribute that is within set with this XML ID

Commands:

List all available options of the given type. Allowed values: cluster
Delete the attribute/option (with -n or -P)
Query the current value of the attribute/option. See also: -n, -P
Update the value of the attribute/option (with -n or -P)

Additional options:

(Advanced) Default value to display if none is found in configuration
Lifetime of the node attribute. Valid values: reboot, forever
Set a node attribute for named node (instead of a cluster option). See also: -l
Which part of the configuration to update/delete/query the option in. Valid values: crm_config, rsc_defaults, op_defaults, tickets
Wait for some event to occur before returning. Values are 'no' (wait only for the attribute daemon to acknowledge the request), 'local' (wait until the change has propagated to where a local query will return the request value, or the value set by a later request), or 'cluster' (wait until the change has propagated to where a query anywhere on the cluster will return the requested value, or the value set by a later request). Default is 'no'. (with -N, and one of -D or -u)
Set an utilization attribute for the node.

Application Options:

-$, --version
Display software version and exit
Increase debug output (may be specified multiple times)
Print only the value on stdout

EXAMPLES

Add new node attribute called 'location' with the value of 'office' for host 'myhost':

crm_attribute --node myhost --name location --update office

Query the value of the 'location' node attribute for host 'myhost':

crm_attribute --node myhost --name location --query

Change the value of the 'location' node attribute for host 'myhost':

crm_attribute --node myhost --name location --update backoffice

Delete the 'location' node attribute for host 'myhost':

crm_attribute --node myhost --name location --delete

Query the value of the 'cluster-delay' cluster option:

crm_attribute --type crm_config --name cluster-delay --query

Query value of the 'cluster-delay' cluster option and print only the value:

crm_attribute --type crm_config --name cluster-delay --query --quiet

AUTHOR

Written by Andrew Beekhof and the Pacemaker project contributors

April 2024 Pacemaker 2.1.7+20240411.81041cf0b-1.1