Mind you I haven&#39;t looked at this patch in context of the <meta http-equiv="content-type" content="text/html; charset=utf-8">xlators/mount/fuse/utils/<a href="http://mount.glusterfs.in/" target="_blank">mount.glusterfs.in</a> file, I&#39;ve just looked at the patch itself. However, it looks like *err* can only be set if *cmd_line1* is defined. What happens if cmd_line1 is empty?<div>

<br></div><div>dcm<br><br><div class="gmail_quote">On Fri, Jun 24, 2011 at 1:26 PM, Jeff Darcy <span dir="ltr">&lt;<a href="mailto:jdarcy@redhat.com">jdarcy@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

>From b5e1a48a067ac1f72b7655f5f13bf46d9bde8334 Mon Sep 17 00:00:00 2001<br>
<br>
The problem was that glusterfs would return zero (success) as soon as it<br>
forked, before we really knew whether the mount using the primary<br>
volfile server had actually succeeded or failed.  This code actually<br>
checks for the appearance of the volume in our mount table, and retries<br>
using the backup volfile server if it doesn&#39;t show up in a reasonable<br>
amount of time.<br>
<br>
It&#39;s hacky, and I know something better is coming along, but this issue<br>
comes up daily in the IRC channel and not everyone wants to set up RRNDS<br>
for something that a script should be able to handle.  Whoever added the<br>
backupvolfile-server option probably meant for it to help in these<br>
cases, but it wasn&#39;t working.<br>
<br>
Signed-off-by: Jeff Darcy &lt;<a href="mailto:jdarcy@redhat.com">jdarcy@redhat.com</a>&gt;<br>
---<br>
 xlators/mount/fuse/utils/<a href="http://mount.glusterfs.in" target="_blank">mount.glusterfs.in</a> |   18 +++++++++++++++---<br>
 1 files changed, 15 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/xlators/mount/fuse/utils/<a href="http://mount.glusterfs.in" target="_blank">mount.glusterfs.in</a><br>
b/xlators/mount/fuse/utils/<a href="http://mount.glusterfs.in" target="_blank">mount.glusterfs.in</a><br>
index e429eca..aca43a9 100755<br>
--- a/xlators/mount/fuse/utils/<a href="http://mount.glusterfs.in" target="_blank">mount.glusterfs.in</a><br>
+++ b/xlators/mount/fuse/utils/<a href="http://mount.glusterfs.in" target="_blank">mount.glusterfs.in</a><br>
@@ -123,13 +123,25 @@ start_glusterfs ()<br>
     err=0;<br>
     $cmd_line;<br>
<br>
+    found=0<br>
+    for i in $(seq 0 10); do<br>
+       sleep 3<br>
+       mount | cut -d&quot; &quot; -f3 | grep &quot;^$mount_point$&quot;<br>
+       if [ $? = 0 ]; then<br>
+           echo &quot;There it is!&quot;<br>
+           found=1<br>
+           break<br>
+        fi<br>
+       echo &quot;Still not there...&quot;<br>
+    done<br>
+<br>
     # retry the failover<br>
-    if [ $? != &quot;0&quot; ]; then<br>
-        err=1;<br>
+    if [ $found = 0 ]; then<br>
+       echo &quot;Trying backupvolfile_server&quot;<br>
         if [ -n &quot;$cmd_line1&quot; ]; then<br>
             cmd_line1=$(echo &quot;$cmd_line1 $mount_point&quot;);<br>
             $cmd_line1<br>
-            if [ $? != &quot;0&quot;]; then<br>
+            if [ $? != &quot;0&quot; ]; then<br>
                 err=1;<br>
             fi<br>
         fi<br>
<font color="#888888">--<br>
1.7.3.4<br>
<br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@nongnu.org">Gluster-devel@nongnu.org</a><br>
<a href="https://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.nongnu.org/mailman/listinfo/gluster-devel</a><br>
</font></blockquote></div><br></div>