[ClusterLabs] Antw: [EXT] Coming in Pacemaker 2.1.0: OCF resource agent path

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Thu May 20 02:10:06 EDT 2021


>>> <kgaillot at redhat.com> schrieb am 19.05.2021 um 23:33 in Nachricht
<34dfdacadc85a258661a9fcd81b39c153ad1cf02.camel at redhat.com>:
> Hi all,
> 
> We squeezed one more feature into the Pacemaker 2.1.0 release for rc2:
> the ability to search multiple directories for OCF resource agents.
> 
> Previously, the OCF root (typically /usr/lib/ocf) could be specified at
> build time via ./configure ‑‑with‑ocfdir, and all resource agents had
> to be in the resource.d directory below that.
> 
> Now, the configure script will have three related options:
> 
> * ‑‑with‑ocfdir: This establishes the OCF_ROOT variable that is passed
> to resource agents, which is used to find the ocf‑shellfuncs include
> files.
> 
> * ‑‑with‑ocfrainstalldir: This specifies where the ocf:pacemaker
> resource agents will be installed.
> 
> * ‑‑with‑ocfrapath: This is a colon‑separated path of directories that
> will be searched for OCF resource agents (like PATH for agents).
> 
> All default to values provided by the resource‑agents package, if
> available. Otherwise, they default to the current behavior.
> 
> Example:
> 
> ./configure ‑‑with‑ocfdir=/usr/libexec/ocf \
>   
>
‑‑with‑ocfrapath=/usr/libexec/ocf/resource.d:/usr/lib/ocf/resource.d:/srv/ocf/
> resource.d
> 
> The above will define the OCF_ROOT as /usr/libexec/ocf instead of the
> usual /usr/lib/ocf. The ocf:pacemaker agents will be installed in
> /usr/libexec/ocf/resource.d (via default).
> 
> When a resource agent needs to be executed, Pacemaker will search in
> three locations: first, /usr/libexec/ocf/resource.d, and if not found
> there, /usr/lib/ocf/resource.d, and if not found in either location,
> /srv/ocf/resource.d.

And when the RA is executed, will the OCF_ROOT be adjusted (for the RA)?

> 
> An example use case might be installing custom agents beneath /srv to
> keep them separate from OS‑provided agents. Or, agents installed in
> various temporary directories for Continuous Integration (CI) testing.

But OCF has "sub-namespaces" (considering OCF to be a namespace) already (like
heartbeat and pacemaker).
So one could add "test", "unstable", "whatever", ...

> Or, a third‑party provider installing agents beneath /opt.
> 
> In the 2.1.0 release, the path will be a build‑time option, for
> simplicity. If there is demand, it should be possible to make it a run‑
> time option, but that would have some drawbacks, so we're currently not
> planning to.

Regards,
Ulrich

> ‑‑ 
> Ken Gaillot <kgaillot at redhat.com>
> 
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users 
> 
> ClusterLabs home: https://www.clusterlabs.org/ 





More information about the Users mailing list