Bug 762539 - (GLUSTER-807) GlusterFS compilation fails on NFS Client
GlusterFS compilation fails on NFS Client
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: nfs (Show other bugs)
mainline
All Linux
low Severity medium
: ---
: ---
Assigned To: Shehjar Tikoo
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-07 04:47 EDT by Anush Shetty
Modified: 2015-12-01 11:45 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: RTA
Mount Type: nfs
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Anush Shetty 2010-04-07 02:09:48 EDT
The nfs log file is in /share/tickets/807
Comment 1 Shehjar Tikoo 2010-04-07 02:26:26 EDT
The log does not help because the last call in there is ACCESS which returns successfully. The problem might be in the results returned through the access reply. The next step is to add some debug logs to see what gets returned.
Comment 2 Anush Shetty 2010-04-07 04:47:04 EDT
then mv -f ".deps/argp-pvh.Tpo" ".deps/argp-pvh.Po"; else rm -f ".deps/argp-pvh.Tpo"; exit 1; fi
rm -f libargp.a
ar cru libargp.a argp-ba.o argp-eexst.o argp-fmtstream.o argp-help.o argp-parse.o argp-pv.o argp-pvh.o
ranlib libargp.a
make[4]: Leaving directory `/mnt/client1/glusterfs-3.0.4rc3/argp-standalone'
make[3]: Leaving directory `/mnt/client1/glusterfs-3.0.4rc3/argp-standalone'
make[2]: Leaving directory `/mnt/client1/glusterfs-3.0.4rc3/argp-standalone'
Making all in libglusterfs
make[2]: Entering directory `/mnt/client1/glusterfs-3.0.4rc3/libglusterfs'
Making all in src
make[3]: Entering directory `/mnt/client1/glusterfs-3.0.4rc3/libglusterfs/src'
if /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../..  -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -D_GNU_SOURCE -DXLATORDIR=\"/mnt/client1/gluster/lib/glusterfs/3.0.4rc3/xlator\" -DSCHEDULERDIR=\"/mnt/client1/gluster/lib/glusterfs/3.0.4rc3/scheduler\" -DTRANSPORTDIR=\"/mnt/client1/gluster/lib/glusterfs/3.0.4rc3/transport\" -DGF_LINUX_HOST_OS -DLIBDIR=\"/mnt/client1/gluster/lib/glusterfs/3.0.4rc3/auth\" -I../../contrib/rbtree  -fPIC  -Wall -g -shared -nostartfiles   -g -O2 -MT libglusterfs_la-dict.lo -MD -MP -MF ".deps/libglusterfs_la-dict.Tpo" -c -o libglusterfs_la-dict.lo `test -f 'dict.c' || echo './'`dict.c; \
        then mv -f ".deps/libglusterfs_la-dict.Tpo" ".deps/libglusterfs_la-dict.Plo"; else rm -f ".deps/libglusterfs_la-dict.Tpo"; exit 1; fi
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I../.. -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -D_GNU_SOURCE -DXLATORDIR=\"/mnt/client1/gluster/lib/glusterfs/3.0.4rc3/xlator\" -DSCHEDULERDIR=\"/mnt/client1/gluster/lib/glusterfs/3.0.4rc3/scheduler\" -DTRANSPORTDIR=\"/mnt/client1/gluster/lib/glusterfs/3.0.4rc3/transport\" -DGF_LINUX_HOST_OS -DLIBDIR=\"/mnt/client1/gluster/lib/glusterfs/3.0.4rc3/auth\" -I../../contrib/rbtree -fPIC -Wall -g -nostartfiles -g -O2 -MT libglusterfs_la-dict.lo -MD -MP -MF .deps/libglusterfs_la-dict.Tpo -c dict.c  -fPIC -DPIC -o .libs/libglusterfs_la-dict.o
bison -y -d ./spec.y
bison: cannot open file `y.tab.c': Permission denied
make[3]: *** [y.tab.h] Error 1
make[3]: Leaving directory `/mnt/client1/glusterfs-3.0.4rc3/libglusterfs/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/client1/glusterfs-3.0.4rc3/libglusterfs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/client1/glusterfs-3.0.4rc3'
make: *** [all] Error 2

GlusterFS Server vol file:
volume posix1
  type storage/posix                    
  option directory /gluster/nfs1        
end-volume

volume ac
  type features/access-control
  subvolumes posix1
end-volume

volume locks
  type features/posix-locks
  option mandatory on         
  subvolumes ac
end-volume

volume brick1
 type performance/io-threads
 option thread-count 8
 subvolumes locks
end-volume

### Add network serving capability to above brick.
volume server
  type protocol/server
  option transport-type tcp                    
  option transport.socket.listen-port 5001
  subvolumes brick1
  option auth.addr.brick1.allow *               
end-volume

NFS Server vol file:

volume client1
  type protocol/client
  option transport-type tcp     
  option remote-host 127.0.0.1     
  option transport.socket.remote-port 5001
  option remote-subvolume brick1  
end-volume

volume client2
  type protocol/client
  option transport-type tcp    
  option remote-host 127.0.0.1     
  option transport.socket.remote-port 5002              
  option remote-subvolume brick2       
end-volume

volume client3
  type protocol/client
  option transport-type tcp     
  option remote-host 127.0.0.1     
  option transport.socket.remote-port 5003            
  option remote-subvolume brick3       
end-volume

volume client4
  type protocol/client
  option transport-type tcp    
  option remote-host 127.0.0.1    
  option transport.socket.remote-port 9304
  option remote-subvolume brick4
end-volume

volume distribute
  type cluster/distribute
  subvolumes client1 client2 client3 client4
end-volume

volume writebehind
  type performance/write-behind
  option cache-size 4MB
  subvolumes replicate
end-volume

volume stat-prefetch
  type performance/stat-prefetch
  subvolumes writebehind
end-volume

volume io-cache
  type performance/io-cache
  option cache-size 64MB             # default is 32MB
  option cache-timeout 2             # default is 1 second
  subvolumes stat-prefetch
end-volume

volume nfs
 type nfs/server
 option rpc-auth.addr.allow *
 subvolumes io-cache
end-volume
Comment 3 Shehjar Tikoo 2010-04-07 05:54:25 EDT
This fails because the access test by super user actually returns the access test bits using only the user, group and other, without    accounting for the special status of super-user. This results in a permission denied for the super-user.
Comment 4 Anand Avati 2010-04-08 03:08:14 EDT
PATCH: http://patches.gluster.com/patch/3121 in master (nfs3: Allow all access to superuser except execute at all times)
Comment 5 Shehjar Tikoo 2010-05-31 09:05:52 EDT
Regression Test:
The problem was that the source tree was extracted as a non-super user. Then, the source compilation was done using the super user. When super-user requested an access test, using the access() syscall, it failed to get the required permissions because the UID did not match the owner's UID of the source files, despite being the super-user. The same thing worked in previous tests because the source tree was extracted as super-user and built with the same id.


Test Case:
1. As a regular user, extract glusterfsd source into a nfs mount point.

2. As super-user, configure and build the source in the nfs mount.

The test must result in an error free build.

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