Bug 761941 (GLUSTER-209) - VMP parsing through fstab has issues
Summary: VMP parsing through fstab has issues
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-209
Product: GlusterFS
Classification: Community
Component: booster
Version: 2.0.5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Shehjar Tikoo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-12 20:50 UTC by Amar Tumballi
Modified: 2013-12-19 00:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: RTP
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Amar Tumballi 2009-08-12 17:53:29 UTC
Also noticed that booster-fstab expects 'logfile' and 'loglevel' as the valid options, whereas 'mount.glusterfs' expects 'log-file' and 'log-level' as options.

booster-fstab pattern parsing should be same as mount.glusterfs

Comment 1 Amar Tumballi 2009-08-12 20:50:54 UTC
Below logs are self-explanatory I guess..

Error case:

root@supernova:/home/amar/work/tmp# cat /etc/exports 
/mnt/export			(rw)
/mnt/exportandsomethingelse	(rw)
root@supernova:/home/amar/work/tmp# cat fstab-booster
/home/amar/work/specs/posix.vol	/mnt/export glusterfs	logfile=/dev/stdout,loglevel=DEBUG
/home/amar/work/specs/posix.vol	/mnt/exportandsomethingelse glusterfs	logfile=/dev/stdout,loglevel=DEBUG

root@supernova:/home/amar/work/tmp#  LD_PRELOAD=/usr/local/lib/glusterfs/glusterfs-booster.so GLUSTERFS_BOOSTER_FSTAB=/home/amar/work/tmp/fstab-booster unfsd -d -e /etc/exports
.....
[2009-08-12 13:45:10] D [libglusterfsclient.c:1410:libgf_vmp_search_entry] libglusterfsclient: VMP Entry found: /mnt/export: /mnt/export/
[2009-08-12 13:45:10] D [libglusterfsclient-dentry.c:366:libgf_client_path_lookup] libglusterfsclient: resolved path(/) to 1/1
[2009-08-12 13:45:10] D [libglusterfsclient.c:1410:libgf_vmp_search_entry] libglusterfsclient: VMP Entry found: /mnt/exportandsomethingelse: /mnt/export/
[2009-08-12 13:45:10] D [libglusterfsclient-dentry.c:224:__do_path_resolve] libglusterfsclient-dentry: loc->parent(1) already present. sending lookup for 1//andsomethingelse
[2009-08-12 13:45:10] D [libglusterfsclient-dentry.c:245:__do_path_resolve] libglusterfsclient-dentry: resolved path(/andsomethingelse) till 1(/). sending lookup for remaining path
[2009-08-12 13:45:10] D [libglusterfsclient.c:1412:libgf_vmp_search_entry] libglusterfsclient: VMP Entry not found
[2009-08-12 13:45:10] D [libglusterfsclient.c:1681:libgf_client_lookup_cbk] libglusterfsclient: 1: (op_num=0) /andsomethingelse => -1 (No such file or directory)
[2009-08-12 13:45:10] E [libglusterfsclient.c:4352:__glusterfs_stat] libglusterfsclient: path lookup failed for (/andsomethingelse)
--------------------------

If I change the order of fstab-booster entries, it works fine.

Valid Behavior:

root@supernova:/home/amar/work/tmp# cat fstab-booster
/home/amar/work/specs/posix.vol	/mnt/exportandsomethingelse 	glusterfs	logfile=/dev/stdout,loglevel=DEBUG
/home/amar/work/specs/posix.vol	/mnt/export 			glusterfs	logfile=/dev/stdout,loglevel=DEBUG

root@supernova:/home/amar/work/tmp#  LD_PRELOAD=/usr/local/lib/glusterfs/glusterfs-booster.so GLUSTERFS_BOOSTER_FSTAB=/home/amar/work/tmp/fstab-booster unfsd -d -e /etc/exports
..........
[2009-08-12 13:49:04] D [libglusterfsclient.c:1410:libgf_vmp_search_entry] libglusterfsclient: VMP Entry found: /mnt/export: /mnt/export/
[2009-08-12 13:49:04] D [libglusterfsclient-dentry.c:366:libgf_client_path_lookup] libglusterfsclient: resolved path(/) to 1/1
[2009-08-12 13:49:04] D [libglusterfsclient.c:1410:libgf_vmp_search_entry] libglusterfsclient: VMP Entry found: /mnt/exportandsomethingelse: /mnt/exportandsomethingelse/
[2009-08-12 13:49:04] D [libglusterfsclient-dentry.c:366:libgf_client_path_lookup] libglusterfsclient: resolved path(/) to 1/1
------

Comment 2 Shehjar Tikoo 2009-08-13 02:08:02 UTC
I agree it most definitely has issues but it just hasnt been looked into enough. Thanks for bringing this up. Working on it now.

Comment 3 Anand Avati 2009-08-17 18:37:34 UTC
PATCH: http://patches.gluster.com/patch/1019 in master (libglusterfsclient: Use components for VMP searches)

Comment 4 Anand Avati 2009-08-17 18:37:51 UTC
PATCH: http://patches.gluster.com/patch/1016 in release-2.0 (libglusterfsclient: Use components for VMP searches)

Comment 5 Anand Avati 2009-08-20 23:05:23 UTC
PATCH: http://patches.gluster.com/patch/1068 in master (changed booster fstab to parse the arguments same as mount.glusterfs)

Comment 6 Anand Avati 2009-08-20 23:05:30 UTC
PATCH: http://patches.gluster.com/patch/1061 in release-2.0 (changed booster fstab to parse the arguments same as mount.glusterfs)

Comment 7 Shehjar Tikoo 2009-08-28 02:36:46 UTC
There is another test case where VMP searching fails, for eg(Credit: Raghu):
The fstab contains:
/usr/htdocs

The bug is that even /usr/conf/htdocs ends up being mapped to the above VMP, which is a wrong behaviour.

Comment 9 Anand Avati 2009-09-02 14:30:07 UTC
PATCH: http://patches.gluster.com/patch/1177 in master (booster: Support backward compatible options)

Comment 10 Anand Avati 2009-09-02 14:30:11 UTC
PATCH: http://patches.gluster.com/patch/1178 in master (libglusterfsclient: Enhance VMP searching logic)

Comment 11 Anand Avati 2009-09-02 14:30:14 UTC
PATCH: http://patches.gluster.com/patch/1179 in master (libglusterfsclient: Compare compcount with path not maxentry)

Comment 12 Anand Avati 2009-09-02 14:30:29 UTC
PATCH: http://patches.gluster.com/patch/1174 in release-2.0 (booster: Support backward compatible options)

Comment 13 Anand Avati 2009-09-02 14:30:32 UTC
PATCH: http://patches.gluster.com/patch/1175 in release-2.0 (libglusterfsclient: Enhance VMP searching logic)

Comment 14 Anand Avati 2009-09-02 14:30:36 UTC
PATCH: http://patches.gluster.com/patch/1176 in release-2.0 (libglusterfsclient: Compare compcount with path not maxentry)


Note You need to log in before you can comment on or make changes to this bug.