Bug 1300845

Summary: FSAL_DESTINATION path prevents daemon start
Product: [Retired] nfs-ganesha Reporter: Ben Werthmann <ben>
Component: SupportAssignee: Kaleb KEITHLEY <kkeithle>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.3CC: ben
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: nfs-ganesha - 2.3.0-ubuntu1~trusty3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-21 23:54:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ben Werthmann 2016-01-21 22:08:47 UTC
Description of problem:
Running ubuntu 14.04. Installed Gluster3.7, libntirpc, and nfs-ganesha from the PPA located here:
https://launchpad.net/~gluster/+archive/ubuntu/nfs-ganesha
https://launchpad.net/~gluster/+archive/ubuntu/libntirpc

Fixes daemon startup errors like this:
21/01/2016 21:37:02 : epoch 56a14f7e : vagrant-ben-bb73156a : nfs-ganesha-18781[main] load_fsal :NFS STARTUP :DEBUG :Loading FSAL GLUSTER with lib/x86_64-linux-gnu/ganesha/libfsalgluster.so
21/01/2016 21:37:02 : epoch 56a14f7e : vagrant-ben-bb73156a : nfs-ganesha-18781[main] load_fsal :NFS STARTUP :CRIT :Could not dlopen module:lib/x86_64-linux-gnu/ganesha/libfsalgluster.so Error:lib/x86_64-linux-gnu/ganesha/libfsalgluster.so: cannot open shared object file: No such file or directory
21/01/2016 21:37:02 : epoch 56a14f7e : vagrant-ben-bb73156a : nfs-ganesha-18781[main] load_fsal :NFS STARTUP :MAJ :Failed to load module (lib/x86_64-linux-gnu/ganesha/libfsalgluster.so) because: Can not access a needed shared library

Additional info:
From 87df4308a0e655196e532ffc469c602e76752abf Mon Sep 17 00:00:00 2001
From: Ben Werthmann <ben>
Date: Thu, 21 Jan 2016 15:23:27 -0500
Subject: [PATCH 2/2] FSAL_DESTINATION path prevents daemon start

* nfs-ganesha-fsal installes FSALs to /usr/lib/x86_64-linux-gnu/ganesha
but nfs-ganesha searches for FSALs in lib/${DEB_HOST_MULTIARCH}/ganesha.
In this situation, nfs-ganesha is unable to start and errors with:
':Could not dlopen module:lib/x86_64-linux-gnu/ganesha/libfsalgluster.so'
* Switched build type to "Maintainer"
* Set the STRICT_PACKAGE=ON - this failes the build if packages are
missing.
---
 debian/rules | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 96c0d13..bbe4766 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,34 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

 override_dh_auto_configure:
         cd src && mv debian debian.deprecated && ln -s ../debian .
-    cd src && dh_auto_configure -- -DBUILD_CONFIG=debian -DFSAL_DESTINATION=lib/${DEB_HOST_MULTIARCH}/ganesha -DCMAKE_BUILD_TYPE=Debug -DUSE_FSAL_NULL=YES -DUSE_FSAL_ZFS=NO -DUSE_FSAL_XFS=YES -DUSE_FSAL_CEPH=NO -DUSE_FSAL_LUSTRE=NO -DUSE_FSAL_SHOOK=NO -DUSE_FSAL_GPFS=YES -DUSE_FSAL_HPSS=NO -DUSE_FSAL_PANFS=NO -DUSE_FSAL_PT=NO -DUSE_FSAL_GLUSTER=YES -DUSE_SYSTEM_NTIRPC=YES -DUSE_9P_RDMA=NO -DUSE_FSAL_LUSTRE_UP=NO -DUSE_LTTNG=NO -DUSE_ADMIN_TOOLS=YES -DUSE_GUI_ADMIN_TOOLS=YES -DUSE_FSAL_VFS=ON -DUSE_FSAL_PROXY=ON -DUSE_DBUS=ON -DUSE_9P=ON -DDISTNAME_HAS_GIT_DATA=OFF -DALLOCATOR=jemalloc
+  cd src && dh_auto_configure --  \
+          -DBUILD_CONFIG=debian        \
+          -DFSAL_DESTINATION=/usr/lib/${DEB_HOST_MULTIARCH}/ganesha \
+          -DCMAKE_BUILD_TYPE=Maintainer \
+          -DSTRICT_PACKAGE=ON           \
+          -DUSE_FSAL_NULL=YES           \
+          -DUSE_FSAL_ZFS=NO             \
+          -DUSE_FSAL_XFS=YES            \
+          -DUSE_FSAL_CEPH=NO            \
+          -DUSE_FSAL_LUSTRE=NO          \
+          -DUSE_FSAL_SHOOK=NO           \
+          -DUSE_FSAL_GPFS=YES           \
+          -DUSE_FSAL_HPSS=NO            \
+          -DUSE_FSAL_PANFS=NO           \
+          -DUSE_FSAL_PT=NO              \
+          -DUSE_FSAL_GLUSTER=YES        \
+          -DUSE_FSAL_VFS=ON             \
+          -DUSE_FSAL_PROXY=ON           \
+          -DUSE_SYSTEM_NTIRPC=YES       \
+          -DUSE_9P_RDMA=NO              \
+          -DUSE_FSAL_LUSTRE_UP=NO       \
+          -DUSE_LTTNG=NO                \
+          -DUSE_ADMIN_TOOLS=YES         \
+          -DUSE_GUI_ADMIN_TOOLS=YES     \
+          -DUSE_DBUS=ON                 \
+          -DUSE_9P=ON                   \
+          -DDISTNAME_HAS_GIT_DATA=OFF   \
+          -DALLOCATOR=jemalloc

 override_dh_auto_build:
        cd src && dh_auto_build
--

Comment 1 Kaleb KEITHLEY 2016-01-21 23:08:41 UTC
New packages are on Launchpad for trusty and wily.

Please change bug status to Verified or Closed if the new packages resolve your issues.

Thanks

Comment 2 Ben Werthmann 2016-01-21 23:54:49 UTC
# Start the daemon
$ sudo ganesha.nfsd -f /etc/ganesha/gluster.conf -L /var/log/ganesha.nfsd.log -N DEBUG

# Logs look good
$ grep load_fsal /var/log/ganesha.nfsd.log
/var/log/ganesha.nfsd.log:21/01/2016 23:43:01 : epoch 56a16d05 : vagrant-ben-bb73156a : nfs-ganesha-27211[main] load_fsal :NFS STARTUP :DEBUG :Loading FSAL GLUSTER with /usr/lib/x86_64-linux-gnu/ganesha/libfsalgluster.so

This issue appears to be resolved. Thanks!

(I can't mark as 'verified'. I'll close as 'worksforme' instead.)