Bug 761936 (GLUSTER-204)

Summary: mount.glusterfs mounts to incorrect mount point
Product: [Community] GlusterFS Reporter: Krishna Srinivas <krishna>
Component: unclassifiedAssignee: Harshavardhana <fharshav>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: mainlineCC: amarts, cww, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Krishna Srinivas 2009-08-11 18:43:22 UTC
following change causes mount point to be incorrect. This is seen when fstab/automount file indicates to read client conf file from a local directory.


@@ -175,10 +188,24 @@ function main ()
         -e 's/[,]*volume-id=[^,]*//' \
         -e 's/[,]*log-server=[^,]*//' \
         -e 's/[,]*log-server-port=[^,]*//');
-    # following line is product of love towards sed
-    # $2=$(echo "$@" | sed -n 's/[^ ]* \([^ ]*\).*/\1/p');
-    
-    mount_point="$2";
+
+    # 
+    [ -n "$helper" ] && {
+        cmd_line=$(echo "$cmd_line --$helper");
+        exec $cmd_line;
+        exit 0;
+    }
+
+    mount_provided=$(echo "$@" | cut -f2 -d'/');
+
+    [ -n "$mount_provided" ] && {
+        mount_point="/$mount_provided";
+    }
+
+    [ -z "$mount_point" ] && {
+        usage;
+        exit 0;
+    }

Comment 1 Anand Avati 2009-09-23 10:27:21 UTC
PATCH: http://patches.gluster.com/patch/1011 in master (mount.glusterfs had a problem understanding when "volfile" was given as one of the mount arguments.)

Comment 2 Amar Tumballi 2009-11-13 16:55:12 UTC
:-) done too..