[ClusterLabs] How about making pacemaker OCF_ROOT_DIR more portable ?

Ken Gaillot kgaillot at redhat.com
Tue Jul 5 10:25:59 EDT 2016

On 07/04/2016 10:07 PM, Li Junliang wrote:
> Hi all,
> 	Currently, OCF_ROOT_DIR in configure.ac for pacemaker is fixed
> to /usr/lib/ocf. But in resource-agents project , we can set
> OCF_ROOT_DIR by setting "--with-ocf-root=xxx" . So , there may be two
> different OCF directories . Would it be better that we add configure
> argument like --with-ocf-root setting ?
> Best wishes,

Yes, I agree.

Historically, Pacemaker has not provided such an option because the
exact path is specified in the OCF standard. So, compiling Pacemaker
with a different value would make it incompatible with standard OCF agents.

However, I do think it's worth giving the user the option to do so, as
long as they're aware of the implications.

There is one way to change it currently. The configure script looks for
the presence of glue_config.h or hb_config.h from the cluster-glue
package. If that exists, it will look there for the value of
OCF_ROOT_DIR (normally "/usr/lib/ocf") and OCF_RA_DIR (normally
"$OCF_ROOT_DIR/resource.d). It would be a bit hacky, but if you don't
use cluster-glue, you could create a header file by that name with the
desired values.

More information about the Users mailing list