Product SiteDocumentation Site

8.2. Node Attribute Expressions

Expression objects are used to control a resource based on the attributes defined by a node or nodes.

Table 8.2. Properties of an Expression

Field Default Description
id
A unique name for the expression (required)
attribute
The node attribute to test (required)
type
string
Determines how the value(s) should be tested. Allowed values are string, integer, and version.
operation
The comparison to perform (required). Allowed values:
  • lt: True if the value of the node’s attribute is less than value
  • gt: True if the value of the node’s attribute is greater than value
  • lte: True if the value of the node’s attribute is less than or equal to value
  • gte: True if the value of the node’s attribute is greater than or equal to value
  • eq: True if the value of the node’s attribute is equal to value
  • ne: True if the value of the node’s attribute is not equal to value
  • defined: True if the node has the named attribute
  • not_defined: True if the node does not have the named attribute
value
User-supplied value for comparison (required)
value-source
literal
How the value is derived (since 1.1.17). Allowed values:
  • literal: value is a literal string to compare against
  • param: value is the name of a resource parameter to compare against (only valid in location constraints)
  • meta: value is the name of a resource meta-attribute to compare against (only valid in location constraints)

In addition to any attributes added by the administrator, the cluster defines special, built-in node attributes for each node that can also be used.

Table 8.3. Built-in node attributes

Name Value
#uname
Node name
#kind
Node type. Possible values are cluster, remote, and container. Kind is remote for Pacemaker Remote nodes created with the ocf:pacemaker:remote resource, and container for Pacemaker Remote guest nodes (a legacy name unrelated to the now-common use of "container" for resource isolation). (since 1.1.13)