4.5 Specifying Resource Failback Nodes (Resource Stickiness)

A resource will automatically fail back to its original node when that node is back online and in the cluster. If you want to prevent a resource from failing back to the node it was running on prior to a failover, or if you want to specify a different node for the resource to fail back to, you must change its resource stickiness value. You can specify resource stickiness when you are creating a resource, or after.

To specify resource stickiness for a resource after it has been created:

  1. Start the HA Management Client and log in to the cluster as described in Section 4.1, Graphical HA Management Client.

  2. Select the desired resource or group, click the Attributes tab, then click Add Attribute.

  3. In the Name field, type resource_stickiness.

  4. In the Value field, specify a value between -100,000 and 100,000.

Consider the following when specifying a resource stickiness value:

Value is 0:

This is the default. The resource will be placed optimally in the system. This may mean that it is moved when a better or less loaded node becomes available. This option is almost equivalent to automatic failback, except that the resource may be moved to a node that is not the one it was previously active on.

Value is greater than 0:

The resource will prefer to remain in its current location, but may be moved if a more suitable node is available. Higher values indicate a stronger preference for a resource to stay where it is.

Value is less than 0:

The resource prefers to move away from its current location. Higher absolute values indicate a stronger preference for a resource to be moved.

Value is 100,000:

The resource will always remain in its current location unless forced off because the node is no longer eligible to run the resource (node shutdown, node standby, or configuration change). This option is almost equivalent to completely disabling automatic failback, except that the resource may be moved to other nodes than the one it was previously active on.

Value is -100,000:

The resource will always move away from its current location.

See also the crm_failcount command: Query the current failcount for the resource myrsc on the node node1:.