On Tue, Feb 21, 2012 at 12:28:45PM -0500, William Seligman wrote:
> I had some problems with the monitor operation of the ocf:heartbeat:exportfs
> resource. I have a solution for one of them that I'd to share with the 
> community.
> 
> The first comes from using regex-like expressions for clientspec; e.g.,
> 
> primitive ExportUsrNevis ocf:heartbeat:exportfs \
>         op monitor interval="30" timeout="20" \
>       params clientspec="*.nevis.columbia.edu" \
>       directory="/usr/nevis" fsid="20"
> 
> For my version of nfs-utils (1.2.3), expressions like "*.nevis.columbia.edu" 
> are
> allowed. The problem is that the monitor operation will fail, since the 
> exportfs
> resource uses grep to test the result of the exportfs command:
> 
> exportfs | grep -zqs 
> "${OCF_RESKEY_directory}[[:space:]]*${OCF_RESKEY_clientspec}"
> 
> I've attached a text file with my proposed change. It "escapes" any regex
> characters in clientspec.

Thanks, but:
http://www.gossamer-threads.com/lists/linuxha/dev/77166

And the resulting commit:
https://github.com/ClusterLabs/resource-agents/commit/5b0bf96e77ed3c4e179c8b4c6a5ffd4709f8fdae

> I had another problem for which I don't think there's a simple overall 
> solution:
> if clientspec refers to a host alias. For example:
> 
> # host mail
> mail.nevis.columbia.edu is an alias for franklin.nevis.columbia.edu.
> franklin.nevis.columbia.edu has address 129.236.252.8
> 
> crm configure primitive ExportMail ocf:heartbeat:exportfs \
>         params clientspec="mail" directory="/mail" fsid="30"
> 
> # exportfs
> /mail                 franklin.nevis.columbia.edu
> 
> The exportfs command "canonicalizes" the clientspec, so once again the monitor
> operation will always fail.
> 
> I either have to use the canonical name in the clientspec,

Right.


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to