wiki:RGManagerResourceAgents
Last modified 3 years ago Last modified on 05/23/11 16:28:35

RGManager has special additions to the resource agent API 1.0.

Parameter Options

  • required - The parameter must be supplied in cluster.conf or rgmanager will ignore the resource. As an example, consider trying to define a file system resource with no device or mount point.
  • unique - The parameter must be unique across all types of the same resource. For example, consider the impact of defining several file systems with the same mount point. The outcome is not predictable, so the mountpoint parameter is defined to be unique.
  • primary - This is how rgmanager addresses the resource internally and creates the OCF_RESOURCE_INSTANCE variable. While not strictly required, it is customary to use the name parameter as the primary parameter.
  • inherit - This defines that the parameter may inherit a parent resource's attribute. The format for this option is resource_type%parameter. For example, if you want to inherit the name of the parent service, you would use:
       <parameter name="foo" inherit="service%name" />
    
    Inherited attributes may not be required, unique, or primary.

Special Tag

  • RGManager uses the special tag, but Lon hasn't updated this wiki to tell you what that means. Good luck. ;)

Shell Variables

  • OCF_RESKEY_META_rgmanager_refcnt - For multiple-instance resources like clustered file systems. This is fed to the agent when a resource is started multiple times and the agent must sort out how to handle it. For example, in the case of a clustered file system, the reference count is incremented each time the resource is started and decremented each time the resource is stopped on a given node. When the reference count reaches 0 (and force_unmount is set), the file system is unmounted. This is done to prevent, for example, one service from unmounting a cluster file system still in use by another service.
  • OCF_RESKEY_META_rgmanager_timeout (new) - This parallels OCF_RESKEY_META_crm_timeout. It is the timeout for the current action fed to the resource agent. The timeout is defined in the OCF RA API as part of the action tag (and may be redefined in cluster.conf on a per-resource, per-action basis)