Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incomplete service configuration #1

Closed
DamienMure opened this issue Sep 23, 2016 · 8 comments
Closed

incomplete service configuration #1

DamienMure opened this issue Sep 23, 2016 · 8 comments

Comments

@DamienMure
Copy link

Hi.
I'm using your debian jessie nfs-ganesha package (v 2.3.2: from here https://download.gluster.org/pub/gluster/glusterfs/nfs-ganesha/2.3.2/Debian/jessie/)

Even if the nfs-ganesha daemon starts, I have 2 questions/issues about the related service dependencies:

  • the "nfs-ganesha-config.service" is defined with the following start command "ExecStart=/usr/libexec/ganesha/nfs-ganesha-config.sh". But there is not such script in the package. So this service is unable to start.
  • the "nfs-ganesha-lock.service" try to include an external service definition from "/usr/lib/systemd/system/rpc-statd.service", but there is not such file on my system. So this service definition ends up with no "start command". I was unable to find a package to provide this service definition (even with rpcbind or nfs-common).

Can you help me ?

Here is more about my configuration:

  • debian 8.6
  • Linux 3.16.0-4-amd64 incomplete service configuration #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux
  • libnfsidmap2:amd64 0.25-5
  • nfs-common 1:1.2.8-9
  • nfs-ganesha 2.3.2-1
  • nfs-ganesha-fsal:amd64 2.3.2-1
  • libntirpc1:amd64 1.3.1-1
  • libtirpc1:amd64 0.2.5-1
  • rpcbind 0.2.1-6+deb8u1

Best Regards
Damien

@justnx
Copy link

justnx commented Feb 7, 2017

Debian package still seems not complete and fully working.

I have fixed some issue for this already as follows:

I've created a defaults file: /etc/default/nfs-ganesha with following content:

OPTIONS="-L /var/log/ganesha.log -f /etc/ganesha/ganesha.conf -N NIV_EVENT"
EPOCH_EXEC="/bin/true"

NUMACTL=/usr/bin/numactl
NUMAOPTS=--interleave=all

Modified nfs-ganesha.service systemd script, so it fits to Debian enviroment (dbus Path Fix and correct environment filepath):

[Unit]
Description=NFS-Ganesha file server
Documentation=http://github.com/nfs-ganesha/nfs-ganesha/wiki
After=rpcbind.service nfs-ganesha-lock.service
Wants=rpcbind.service nfs-ganesha-lock.service
Conflicts=nfs.target

After=nfs-ganesha-config.service
Wants=nfs-ganesha-config.service

[Service]
Type=forking
Environment="NOFILE=1048576"
EnvironmentFile=-/etc/default/nfs-ganesha
ExecStart=/bin/bash -c "${NUMACTL} ${NUMAOPTS} /usr/bin/ganesha.nfsd ${OPTIONS} ${EPOCH}"
ExecStartPost=-/bin/bash -c "prlimit --pid $MAINPID --nofile=$NOFILE:$NOFILE"
ExecReload=/usr/bin/dbus-send --system   --dest=org.ganesha.nfsd --type=method_call /org/ganesha/nfsd/admin  org.ganesha.nfsd.admin.reload
ExecStop=/usr/bin/dbus-send --system   --dest=org.ganesha.nfsd --type=method_call /org/ganesha/nfsd/admin org.ganesha.nfsd.admin.shutdown

[Install]
WantedBy=multi-user.target
Also=nfs-ganesha-lock.service

But still missing the configuration modifications for nfs-common/rpcbind and lock service: nfs-ganesha-config.service and nfs-ganesha-config.service

@DamienMure
Copy link
Author

Hi.
Thank for the update.
I'm now using a nfs server directly provided by my storage area (no more nfs-ganesha).
I'm sure this partial fix will help other people.

Best Regards.
Damien

@HOSTED-POWER
Copy link

Hello Damien,

Thanks, we also have no functioning lock service on Debian Stretch, what is going on? Any fix for this planned?

@malahal
Copy link

malahal commented Jul 10, 2017

/usr/lib/systemd/system/rpc-statd.service should be /lib/systemd/system/rpc-statd.service on debian. There was some reason for creating nfs-ganesha-lock.service rather than use rpcbind/rpc-statd service directly. I don't think those reasons are with the latest distros we use. As a workaround, you should be able to start rpc-statd.service on debian, and then nfs-ganesha.service.

@HOSTED-POWER
Copy link

HOSTED-POWER commented Jul 10, 2017

Hi malahal ,

I created a symink and that works now. But now I have the following problem:

After reboot the nfs-ganesha.service is sometimes started before gluster server is started completely. I already tried adding a dependency like this:

nfs-ganesha.service
● ├─glusterfs-server.service
● ├─nfs-ganesha-config.service
● ├─nfs-ganesha-lock.service
● ├─rpcbind.service
● ├─system.slice
● └─sysinit.target

But even then once in 3 reboots, the services started just a little bit too soon and gluster wasn't correctly initalized yet.

I also noticed the nfs-ganesha-config.service fails as well:
root@app1:/# systemctl status nfs-ganesha-config.service
● nfs-ganesha-config.service - Process NFS-Ganesha configuration
Loaded: loaded (/lib/systemd/system/nfs-ganesha-config.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-07-10 19:55:29 CEST; 6min ago
Process: 1635 ExecStart=/usr/libexec/ganesha/nfs-ganesha-config.sh (code=exited, status=203/EXEC)
Main PID: 1635 (code=exited, status=203/EXEC)

Jul 10 19:55:29 app1 systemd[1]: Starting Process NFS-Ganesha configuration...
Jul 10 19:55:29 app1 systemd[1]: nfs-ganesha-config.service: Main process exited, code=exited, status=203/EXEC
Jul 10 19:55:29 app1 systemd[1]: Failed to start Process NFS-Ganesha configuration.
Jul 10 19:55:29 app1 systemd[1]: nfs-ganesha-config.service: Unit entered failed state.
Jul 10 19:55:29 app1 systemd[1]: nfs-ganesha-config.service: Failed with result 'exit-code'.

This is because the /usr/libexec/ganesha/nfs-ganesha-config.sh doesn't even exists :(

I tried gluster before without nfs and it worked fine, but with nfs it's a real hassle.

What I'm trying to achieve is the following:

3 app servers with gluster on each of them + the ganesha nfs. Ideally all 3 should mount the local nfs server on boot. So far not much luck with this :(

I don't want to use the gluster native fuse mount because it's crazy slow with small files, nfs is very fast compared to it.

@malahal
Copy link

malahal commented Jul 10, 2017

/usr/libexec/ganesha/nfs-ganesha-config.sh should be part of nfs-ganesha package. I don't use ubuntu but check why it is not part of that package. Maybe debian/rules file is missing something like this in override_dh_install target:

$ grep nfs-ganesha-config.sh -r debian/rules
chmod a+x src/scripts/nfs-ganesha-config.sh
cp src/scripts/nfs-ganesha-config.sh debian/tmp/usr/libexec/ganesha/

@HOSTED-POWER
Copy link

Thx, but does seem to be a known issue I suppose: nfs-ganesha/nfs-ganesha#125

Also I needed to patch /lib/systemd/system/nfs-ganesha-lock.service since the path is wrong:
#.include /usr/lib/systemd/system/rpc-statd.service
.include /lib/systemd/system/rpc-statd.service

Seems really untested on debian varians all this stuff :(

PS using version 2.5 with gluster 3.11, starting to wonder if I shouldn't be using older version.

@kalebskeithley
Copy link
Contributor

fixed in nfs-ganesha-2.5.0-3 packages in Ubuntu Launchpad PPA and download.gluster.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants