diff --git a/doc-writing-python-agents-add-description-of-is_prob.patch b/doc-writing-python-agents-add-description-of-is_prob.patch new file mode 100644 index 0000000000000000000000000000000000000000..a4bd6d520f10417e7ad9e5a9d5683fffef432a7e --- /dev/null +++ b/doc-writing-python-agents-add-description-of-is_prob.patch @@ -0,0 +1,29 @@ +From db77cd138eede869b31ac71782be674d39a1377c Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Tue, 23 Apr 2024 13:15:06 +0200 +Subject: [PATCH] doc: writing-python-agents: add description of is_probe() and + distro() + +--- + doc/dev-guides/writing-python-agents.md | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/doc/dev-guides/writing-python-agents.md b/doc/dev-guides/writing-python-agents.md +index 9bf89d09..1b05e23b 100644 +--- a/doc/dev-guides/writing-python-agents.md ++++ b/doc/dev-guides/writing-python-agents.md +@@ -52,7 +52,11 @@ logger.error("Something went terribly wrong.") + * `ocf_exit_reason`: Prints the exit error string to stderr. + * `have_binary`: Returns True if the given binary is available. + * `is_true`: Converts an OCF truth value to a Python boolean. ++* `is_probe`: Returns True when running a probe action. Used to return ++ OCF_NOT_RUNNING instead of error code that would cause unexpected actions ++ like fencing before starting the resource or when it is disabled. + * `get_parameter`: Looks up the matching `OCF_RESKEY_` environment variable. ++* `distro`: Returns / or if version info is unavailable. + * `Agent`: Class which helps to generate the XML metadata. + * `run`: OCF run loop implementation. + +-- +2.25.1 + diff --git a/resource-agents.spec b/resource-agents.spec index dcf1f3e2fe176356b0d3cf726ed7d147c9f780a6..51300e46d53e146b54679f16a88758cf67c1493d 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -1,7 +1,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.13.0 -Release: 19 +Release: 20 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents Source0: https://github.com/ClusterLabs/resource-agents/archive/v%{version}.tar.gz @@ -24,6 +24,7 @@ Patch0015: findifsh-fix-corner-cases.patch Patch0016: fix-OCF_SUCESS-name-in-db2_notify.patch Patch0017: docs-writing-python-agents-update-required-Python-ve.patch Patch0018: galera-allow-joiner-to-report-non-Primary-during-ini.patch +Patch0019: doc-writing-python-agents-add-description-of-is_prob.patch Obsoletes: heartbeat-resources <= %{version} Provides: heartbeat-resources = %{version} BuildRequires: automake autoconf pkgconfig gcc perl-interpreter perl-generators python3-devel @@ -121,6 +122,9 @@ export CFLAGS="$(echo '%{optflags}')" %{_mandir}/man8/{ocf-tester.8*,ldirectord.8*} %changelog +* Thu Apr 25 2024 zouzhimin - 4.13.0-20 +- doc: writing-python-agents: add description of is_probe() and distro() + * Tue Apr 22 2024 bixiaoyan - 4.13.0-19 - galera: allow joiner to report non-Primary during initial IST