Bug 1654778 - Please update GlusterFS documentation to describe how to do a non-root install
Summary: Please update GlusterFS documentation to describe how to do a non-root install
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: GlusterFS
Classification: Community
Component: doc
Version: 5
Hardware: x86_64
OS: Linux
high
low
Target Milestone: ---
Assignee: Sheetal Pamecha
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-29 16:35 UTC by Brian Rzycki
Modified: 2019-08-09 05:59 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-09 05:59:23 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Brian Rzycki 2018-11-29 16:35:17 UTC
Description of problem:
Building and installing GlusterFS purely as a non-root user requires more options than './configure --prefix=$HOME/gfs'. It would be helpful to others if the documentation listed the exact flags needed for non-root builds and installs.

Version-Release number of selected component (if applicable):
Gluster v5.1 downloaded from Github tag v5.1:
https://github.com/gluster/glusterfs/archive/v5.1.zip

How reproducible:
100%

Steps to Reproduce:
non-root-user $ ./autogen.sh
non-root-user $ ./configure --prefix=$HOME/gfs
non-root-user $ make -j
non-root-user $ make install

Actual results:
make[5]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/sbin'
 /usr/bin/install -c mount.glusterfs '/sbin'
/usr/bin/install: cannot create regular file '/sbin/mount.glusterfs': Permission denied
Makefile:426: recipe for target 'install-utilSCRIPTS' failed
make[5]: *** [install-utilSCRIPTS] Error 1
Makefile:516: recipe for target 'install-am' failed
make[4]: *** [install-am] Error 2
Makefile:462: recipe for target 'install-recursive' failed
make[3]: *** [install-recursive] Error 1
Makefile:462: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
Makefile:468: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
Makefile:597: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1


Expected results:
make[5]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p "$HOME/gfs/sbin"
 /usr/bin/install -c mount.glusterfs "$HOME/gfs/sbin"
...
# (install success)

Additional info:
I found no documentation online, or in the repository, for the correct number of steps:

./autogen.sh
./configure \
  --prefix=$HOME/gfs \
  --with-mountutildir=$HOME/gfs/sbin \
  --with-initdir=$HOME/gfs/etc/init.d
make -j
make install

This required me examining Makefile.in and eventually discovering the hard-codded '/' path prefix for mountutildir and initdir variables.

Comment 1 Sheetal Pamecha 2019-07-29 11:00:55 UTC
Building and Installing GlusterFS purely as a non-root user will work with these steps - 
./autogen.sh
./configure \
  --prefix=$HOME/gfs \
  --with-mountutildir=$HOME/gfs/sbin \
  --with-initdir=$HOME/gfs/etc/init.d
make -j
make install

1. However to run glusterfs and start glusterd you need to provide init scripts to systemctl.
As initdir path is changed "initdir=$HOME/gfs/etc/init.d" systemctl will not able to locate it and fork it into the background as a daemon process. This requires changing env variable path to get the glusterd.service from a new location than default. If this is not done you cannot run 'gluster' commands.

2. Another thing is that mount.glusterfs script has to be in /sbin/mount.glusterfs for mounting via command mount -t glusterfs to work. Changing mountutildir path changes script location to $HOME/gfs/sbin/mount.glusterfs. Workarounds are there to manually change and use fstab resulting is unnecessary steps as compared to single mount command.

3. All the log files are placed in the /var/log/glusterfs directory by default(cli, glusterd, mount, fuse etc). running gluster commands from nonsuper user will result in error in creating all these log files unless triggered with sudo privileges.

Providing Installing steps for non-root user in doc will result in confusion and overheads while using glusterfs. Based on above mentioned points I would like to close this bug.

Comment 2 Brian Rzycki 2019-07-29 17:12:28 UTC
That's fine. In my opinion the documentation should be more explicit that GlusterFS cannot run as a non privilidged user and requires some amount of group admin rights.

Comment 3 Sheetal Pamecha 2019-08-09 05:59:23 UTC
Its mentioned in docs https://docs.gluster.org/en/latest/Developer-guide/Building-GlusterFS/#running-glusterfs


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