Product SiteDocumentation Site

5.6. Manage Node Attributes, Cluster Options and Defaults with crm_attribute and attrd_updater

crm_attribute and attrd_updater are confusingly similar tools with subtle differences.
attrd_updater can query and update node attributes. crm_attribute can query and update not only node attributes, but also cluster options, resource defaults, and operation defaults.
To understand the differences, it helps to understand the various types of node attribute.

Table 5.1. Types of Node Attributes

TypeRecorded in CIB?Recorded in attribute manager memory?Survive full cluster restart?Manageable by crm_attribute?Manageable by attrd_updater?
permanent
yes
no
yes
yes
no
transient
yes
yes
no
yes
yes
private
no
yes
no
no
yes
As you can see from the table above, crm_attribute can manage permanent and transient node attributes, while attrd_updater can manage transient and private node attributes.
The difference between the two tools lies mainly in how they update node attributes: attrd_updater always contacts the Pacemaker attribute manager directly, while crm_attribute will contact the attribute manager only for transient node attributes, and will instead modify the CIB directly for permanent node attributes (and for transient node attributes when unable to contact the attribute manager).
By contacting the attribute manager directly, attrd_updater can change an attribute’s "dampening" (whether changes are immediately flushed to the CIB or after a specified amount of time, to minimize disk writes for frequent changes), set private node attributes (which are never written to the CIB), and set attributes for nodes that don’t yet exist.
By modifying the CIB directly, crm_attribute can set permanent node attributes (which are only in the CIB and not managed by the attribute manager), and can be used with saved CIB files and shadow CIBs.
However a transient node attribute is set, it is synchronized between the CIB and the attribute manager, on all nodes.