Cluster-wide resource behavior becomes predictable when common Pacemaker meta-attributes are managed in one place instead of repeated per resource. Resource defaults standardize failover decisions such as how readily a service moves after failures and how strongly it prefers to stay on its current node.
In Pacemaker, resource defaults are stored in the cluster information base (CIB) under rsc_defaults and are inherited as resource meta attributes by every resource. The pcs command-line tool updates these defaults, and any resource that defines its own meta-attributes takes precedence over the inherited defaults.
Changes apply immediately to scheduling calculations and can influence placement on the next transition. Aggressive settings may cause unnecessary migrations or keep resources pinned to a node that should be avoided, so adjustments belong in small increments with close observation of cluster behavior.
Steps to set Pacemaker resource defaults:
- Review current cluster-wide resource defaults.
$ sudo pcs resource defaults
- Choose the resource meta-attribute to change.
resource-stickiness biases placement toward the current node, migration-threshold sets how many failures are tolerated before moving, and failure-timeout controls when recorded failures expire; explicit per-resource meta attributes override inherited defaults.
- Update the chosen default value in the cluster configuration.
$ sudo pcs resource defaults update resource-stickiness=100 Warning: Defaults do not apply to resources which override them with their own defined values
No output typically indicates the update was accepted.
Setting migration-threshold=1 can force a move after a single counted failure, while very high resource-stickiness can keep a resource on a node that should be avoided during degradation.
- Verify the updated resource defaults.
$ sudo pcs resource defaults Meta Attrs: rsc_defaults-meta_attributes resource-stickiness=100
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
