summaryrefslogtreecommitdiffstats
path: root/heartbeat/README
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:52:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:52:36 +0000
commit7de03e4e519705301265c0415b3c0af85263a7ac (patch)
tree29d819c5227e3619d18a67d2a5dde963b3229dbe /heartbeat/README
parentInitial commit. (diff)
downloadresource-agents-7de03e4e519705301265c0415b3c0af85263a7ac.tar.xz
resource-agents-7de03e4e519705301265c0415b3c0af85263a7ac.zip
Adding upstream version 1:4.13.0.upstream/1%4.13.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'heartbeat/README')
-rw-r--r--heartbeat/README46
1 files changed, 46 insertions, 0 deletions
diff --git a/heartbeat/README b/heartbeat/README
new file mode 100644
index 0000000..6042956
--- /dev/null
+++ b/heartbeat/README
@@ -0,0 +1,46 @@
+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. If not,
+then the trace would be saved to the OCF_RESKEY_trace_dir.
+If it's also not defined, the log will be saved 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.
+