Hi! It seems it was a mistake to put .ocf-shellfuncs in the heartbeat subdirectory right from the beginning, and now it's hard to move it unless you use a (symbolic) link.
If it's truely common for all OCF RAs, it should have ist own directory like "lib" (/usr/lib/ocf/resource.d/lib, or simply /usr/lib/ocf). Amazingly, while looking around I found /usr/lib/ocf/lib/heartbeat containing ocf-shellfuncs (without a leading dot). Still there's too much "heartbeat" in it ;-) At least on the SLES11 SP1 system both files are identical. Regards, Ulrich >>> <[email protected]> schrieb am 26.07.2012 um 17:33 in Nachricht <of0b56bafd.14af6b14-onc1257a47.005485d7-c1257a47.00556...@bull.net>: > For the first point, in fact I've modified : > : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} > . ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs > as > : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/resource.d/heartbeat} > . ${OCF_FUNCTIONS_DIR}/.ocf-shellfuncs > because on my system (RH) , there is only one ocf-shellfuncs (without the > ".") here : > /usr/share/cluster/ocf-shellfuncs , so that's why the script does not find > this > file ocf-shellfuncs under ${OCF_ROOT}/lib/heartbeat} > > Alain > > > > De : [email protected] > A : [email protected] > Date : 26/07/2012 16:49 > Objet : [Linux-HA] tuning of ocf script exportfs > Envoyé par : [email protected] > > > > Hi Dejan > > a little contribution on the script exportfs , last release found here > (delivered 16 days ago): > https://github.com/ClusterLabs/resource-agents/tree/master/heartbeat > > two things except if I'm mistaking: > > 1/ little typo : I think the "." is missing for .ocf-shellfuncs > > 2/ the script does not work if we set the OCF_RESKEY_clientspec="*" in > params of the exportfs resource, > > due to the exportfs_monitor function : > when using * instead of hostname, the exportfs is displaying for example : > /alain <world> > and the line : > exportfs | sed -e '$! N; s/\n[[:space:]]\+/ /; t; > s/[[:space:]]\+\([^[:space:]]\+\)\(\n\|$\)/ \1\2/g; P;D;' | grep -q -x -F > > "${OCF_RESKEY_directory} ${OCF_RESKEY_clientspec}" > returns 1 and then $OCF_NOT_RUNNING > > So I don't know if it is the more elegant manner to fix this little issue, > > but I've added at the begining of exportfs_monitor : > > exportfs_monitor () > { > # exportfs output wraps lines for long export directory names. > # We unwrap here with sed. > # We then do a literal match on the full line (grep -x -F) > if [ "${OCF_RESKEY_clientspec}" == "*" ]; then > CLIENTSPEC="<world>" > else > CLIENTSPEC=${OCF_RESKEY_clientspec} > fi > > and use $CLIENTSPEC on the grep : > exportfs | sed -e '$! N; s/\n[[:space:]]\+/ /; t; > s/[[:space:]]\+\([^[:space:]]\+\)\(\n\|$\)/ \1\2/g; P;D;' | grep -q -x -F > > "${OCF_RESKEY_directory} ${CLIENTSPEC} > > With this tuning, it works fine. > > Regards > Alain > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems > > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems > _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
