Product SiteDocumentation Site Notifications

Supporting notifications requires the notify action to be implemented. Once supported, the notify action will be passed 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.4. Environment variables supplied with Clone notify actions
Variable Description
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 the that are running
OCF_RESKEY_CRM_meta_notify_inactive_resource Resources the 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
OCF_RESKEY_CRM_meta_notify_inactive_uname Nodes on which resources are not 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.
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
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"
Example notification variables