Hello,
Am 19.04.2010 17:28, schrieb Florian Haas:
After last week's resource-agents 1.0.3 release, I have merged the
exportfs resource agent, which has lived in its separate branch so far,
into the default branch.
Thank you all for your work on this, it seems to be exactly what I have
been looking for for quite some time now.
I've been testing this on a Debian Lenny-based Pacemaker cluster with
mixed success so far.
The first issue I ran into is certainly partly home-made when I set up
the exportfs RA with a permissive clientspec, i.e.
primitive export_r0 ocf:heartbeat:exportfs \
params clientspec="*" \
options="rw,sync,no_subtree_check,no_root_squash" \
directory="/var/exports/r0" fsid="1" \
op start interval="0" timeout="60" \
op stop interval="0" timeout="30" \
op monitor interval="10" timeout="20" \
This causes an incorrect "Export not reported by showmount -e" in
exportfs_start().
I fixed this for myself by shortening
grep -E "^${OCF_RESKEY_directory}[[:space:]]*${OCF_RESKEY_clientspec}$"
to
grep -E "^${OCF_RESKEY_directory}[[:space:]]"
The only problem I see with this is that it could cause problems if I
wanted to have multiple exportsfs resources for the same filesystem. On
the other hand, the existing pattern would fail in that case, too, since
showmount seems to list multiple clients specs separated by comma in a
single line.
The second problem I ran into seems to have been introduced by accident
in changeset 1768 (http://hg.linux-ha.org/agents/rev/64bc3f067df0),
where at lines 20-21 /var/lib/nfs/etab is changed to $RMTAB, which
refers to /var/lib/nfs/rmtab.
I'm attaching two patches for your kind consideration.
Cheers,
Thomas
diff --git a/heartbeat/exportfs b/heartbeat/exportfs
--- a/heartbeat/exportfs
+++ b/heartbeat/exportfs
@@ -108,7 +108,7 @@
exportfs_monitor ()
{
- grep -qs "${OCF_RESKEY_directory}" $RMTAB
+ grep -qs "${OCF_RESKEY_directory}" $ETAB
#Adapt grep status code to OCF return code
case $? in
@@ -229,6 +229,7 @@
exit $OCF_ERR_ARGS
fi
+ETAB=/var/lib/nfs/etab
RMTAB=/var/lib/nfs/rmtab
PIDF=${OCF_RESKEY_directory}/.exportfs_backup.pid
FS_RMTAB=${OCF_RESKEY_directory}/.rmtabdiff --git a/heartbeat/exportfs b/heartbeat/exportfs
--- a/heartbeat/exportfs
+++ b/heartbeat/exportfs
@@ -139,7 +139,7 @@
RETRIES=0
while [ 1 ]; do
- showmount -e | grep -E
"^${OCF_RESKEY_directory}[[:space:]]*${OCF_RESKEY_clientspec}$"
+ showmount -e | grep -E "^${OCF_RESKEY_directory}[[:space:]]"
rc=$?
if [ $rc -eq 0 ]; then
break_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/