8. Conventions

This section contains a collection of conventions that have emerged in the resource agent repositories over the years. Following these conventions is by no means mandatory for resource agent authors, but it is a good idea based on the Principle of Least Surprise — resource agents following these conventions will be easier to understand, review, and use than those that do not.

8.1. Well-known parameter names

Several parameter names are supported by a number of resource agents. For new resource agents, following these examples is generally a good idea:

  • binary — the name of a binary that principally manages the resource, such as a server daemon
  • config — the full path to a configuration file
  • pid — the full path to a file holding a process ID (PID)
  • log — the full path to a log file
  • socket — the full path to a UNIX socket that the resource manages
  • ip — an IP address that a daemon binds to
  • port — a TCP or UDP port that a daemon binds to

Needless to say, resource agents should only implement any of these parameters if they are sensible to use in the agent’s context.