File: README

package info (click to toggle)
resource-agents 1%3A4.0.0~rc1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,644 kB
  • ctags: 2,191
  • sloc: sh: 47,713; ansic: 4,074; perl: 3,457; makefile: 663; xml: 89
file content (44 lines) | stat: -rw-r--r-- 1,341 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
The OCF RA shared code directory

If an RA is too big to be comfortably maintained, split it into
several source files. Obviosuly, if two or more RAs share some
code, move that code out to a file which can be shared.

These files will be installed in $OCF_ROOT/lib/heartbeat with
permissions 644.

Naming practice

Use names such as <RA>.sh or <RA>-check.sh or anything-else.sh
where "anything-else" should be related to both the RA and the
code it contains. By adding extension (.sh) it is going to be
easier to notice that these files are not complete resource
agents.

For instance, oracle and oralsnr RA can both use code in
ora-common.sh.

Of course, if the RA is implemented in another programming
language, use the appropriate extension.

RA tracing

RA tracing may be turned on by setting OCF_TRACE_RA. The trace
output will be saved to OCF_TRACE_FILE, if set, or by default to

  $HA_VARLIB/trace_ra/<type>/<id>.<action>.<timestamp>

e.g. $HA_VARLIB/trace_ra/oracle/db.start.2012-11-27.08:37:08

HA_VARLIB is typically set to /var/lib/heartbeat.

OCF_TRACE_FILE can be set to a path or file descriptor:

- FD (small integer [3-9]) in that case it is up to the callers
  to capture output; the FD _must_ be open for writing

- absolute path

NB: FD 9 may be used for tracing with bash >= v4 in case
OCF_TRACE_FILE is set to a path.