Product SiteDocumentation Site

10.2.9.3. Clone Notifications

If the clone has the notify meta-attribute set to true, and the resource agent supports the notify action, Pacemaker will call the action when appropriate, passing a number of extra variables which, when combined with additional context, can be used to calculate the current state of the cluster and what is about to happen to it.

Table 10.8. Environment variables supplied with Clone notify actions

VariableDescription
OCF_RESKEY_CRM_meta_notify_type
Allowed values: pre, post
OCF_RESKEY_CRM_meta_notify_operation
Allowed values: start, stop
OCF_RESKEY_CRM_meta_notify_start_resource
Resources to be started
OCF_RESKEY_CRM_meta_notify_stop_resource
Resources to be stopped
OCF_RESKEY_CRM_meta_notify_active_resource
Resources that are running
OCF_RESKEY_CRM_meta_notify_inactive_resource
Resources that are not running
OCF_RESKEY_CRM_meta_notify_start_uname
Nodes on which resources will be started
OCF_RESKEY_CRM_meta_notify_stop_uname
Nodes on which resources will be stopped
OCF_RESKEY_CRM_meta_notify_active_uname
Nodes on which resources are running
The variables come in pairs, such as OCF_RESKEY_CRM_meta_notify_start_resource and OCF_RESKEY_CRM_meta_notify_start_uname, and should be treated as an array of whitespace-separated elements.
OCF_RESKEY_CRM_meta_notify_inactive_resource is an exception, as the matching uname variable does not exist since inactive resources are not running on any node.
Thus, in order to indicate that clone:0 will be started on sles-1, clone:2 will be started on sles-3, and clone:3 will be started on sles-2, the cluster would set:

Example 10.9. Notification variables

OCF_RESKEY_CRM_meta_notify_start_resource="clone:0 clone:2 clone:3"
OCF_RESKEY_CRM_meta_notify_start_uname="sles-1 sles-3 sles-2"

Note

Pacemaker will log but otherwise ignore failures of notify actions.