Alessandro De Salvo
2015-Jun-17 17:27 UTC
[Gluster-users] Problems in /usr/libexec/ganesha/dbus-send.sh and ganesha dbus interface when disabling exports from gluster
Hi, when disabling exports from gluster 3.7.1, by using gluster vol set <volume> ganesha.enable off, I always get the following error: Error: Dynamic export addition/deletion failed. Please see log file for details This message is produced by the failure of /usr/libexec/ganesha/dbus-send.sh, and in fact if I manually perform the command to remove the share I see: # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport uint16:2 Error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus) So, there is a timeout and it fails completely. In this case I think there is a bug in /usr/libexec/ganesha/dbus-send.sh, since it blindly deletes the share config if the RemoveExport fails (function check_cmd_status()), but leaves the %include inside ganesha.conf as in the check_cmd_status() there is a runaway condition and the other removal statements are then not executed. I believe the logic should be fixed here, otherwise even a restart of the service will fail due to the bad configuration. What?s more worrying is the problem with the dbus. Issuing a DisplayExport before the RemoveExport apparently fixes the problem, so something like this always works: # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.DisplayExport uint16:2 # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport uint16:2 So, it?s like the DisplayExport is forcing someway a refresh that is needed by the RemoveExport. Any idea why? I?m using the latest version of ganesha 2.2.0, i.e. 2.2.0-3. Thanks, Alessandro PS: sorry for reporting so many things in a few days :-) -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1770 bytes Desc: not available URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20150617/5e707347/attachment.p7s>
Soumya Koduri
2015-Jun-17 17:41 UTC
[Gluster-users] [Nfs-ganesha-devel] Problems in /usr/libexec/ganesha/dbus-send.sh and ganesha dbus interface when disabling exports from gluster
On 06/17/2015 10:57 PM, Alessandro De Salvo wrote:> Hi, > when disabling exports from gluster 3.7.1, by using gluster vol set <volume> ganesha.enable off, I always get the following error: > > Error: Dynamic export addition/deletion failed. Please see log file for details > > This message is produced by the failure of /usr/libexec/ganesha/dbus-send.sh, and in fact if I manually perform the command to remove the share I see:you got it wrong. '/usr/libexec/ganesha/dbus-send.sh' is used by Gluster-CLI to unexport the volume "gluster volume set <volname> ganesha.enable off" which rightly deletes the export file too while un-exporting the volume.> > # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport uint16:2 > Error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus) > > So, there is a timeout and it fails completely.Check if nfs-ganesha is still running. There was a bug in unexporting the volume. Its been fixed recently in V2.3-dev, yet to be back-ported to V2.2-stable branch. https://review.gerrithub.io/#/c/236129/ Thanks, Soumya> In this case I think there is a bug in /usr/libexec/ganesha/dbus-send.sh, since it blindly deletes the share config if the RemoveExport fails (function check_cmd_status()), but leaves the %include inside ganesha.conf as in the check_cmd_status() there is a runaway condition and the other removal statements are then not executed. I believe the logic should be fixed here, otherwise even a restart of the service will fail due to the bad configuration. > > What?s more worrying is the problem with the dbus. Issuing a DisplayExport before the RemoveExport apparently fixes the problem, so something like this always works: > > # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.DisplayExport uint16:2 > # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport uint16:2 > > So, it?s like the DisplayExport is forcing someway a refresh that is needed by the RemoveExport. Any idea why? > I?m using the latest version of ganesha 2.2.0, i.e. 2.2.0-3. > Thanks, > > Alessandro > > PS: sorry for reporting so many things in a few days :-) > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Nfs-ganesha-devel mailing list > Nfs-ganesha-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel >
Malahal Naineni
2015-Jun-17 17:42 UTC
[Gluster-users] [Nfs-ganesha-devel] Problems in /usr/libexec/ganesha/dbus-send.sh and ganesha dbus interface when disabling exports from gluster
I have no knowledge of dbus-send.sh, is it GLUSTER fsal specific? I don't see it in ganesha source code at all. I use ganesha_mgr command to show/delete/remove exports. Can you try it and see if that works? "ganesha_mgr remove_export 2" should be the correct call in your case. Regards, Malahal. Alessandro De Salvo [Alessandro.DeSalvo at roma1.infn.it] wrote:> Hi, > when disabling exports from gluster 3.7.1, by using gluster vol set <volume> ganesha.enable off, I always get the following error: > > Error: Dynamic export addition/deletion failed. Please see log file for details > > This message is produced by the failure of /usr/libexec/ganesha/dbus-send.sh, and in fact if I manually perform the command to remove the share I see: > > # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport uint16:2 > Error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus) > > So, there is a timeout and it fails completely. > In this case I think there is a bug in /usr/libexec/ganesha/dbus-send.sh, since it blindly deletes the share config if the RemoveExport fails (function check_cmd_status()), but leaves the %include inside ganesha.conf as in the check_cmd_status() there is a runaway condition and the other removal statements are then not executed. I believe the logic should be fixed here, otherwise even a restart of the service will fail due to the bad configuration. > > What?s more worrying is the problem with the dbus. Issuing a DisplayExport before the RemoveExport apparently fixes the problem, so something like this always works: > > # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.DisplayExport uint16:2 > # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport uint16:2 > > So, it?s like the DisplayExport is forcing someway a refresh that is needed by the RemoveExport. Any idea why? > I?m using the latest version of ganesha 2.2.0, i.e. 2.2.0-3. > Thanks, > > Alessandro > > PS: sorry for reporting so many things in a few days :-)> ------------------------------------------------------------------------------> _______________________________________________ > Nfs-ganesha-devel mailing list > Nfs-ganesha-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel
Malahal Naineni
2015-Jun-17 17:51 UTC
[Gluster-users] [Nfs-ganesha-devel] Problems in /usr/libexec/ganesha/dbus-send.sh and ganesha dbus interface when disabling exports from gluster
Alessandro De Salvo [Alessandro.DeSalvo at roma1.infn.it] wrote:> What?s more worrying is the problem with the dbus. Issuing a DisplayExport before the RemoveExport apparently fixes the problem, so something like this always works: > > # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.DisplayExport uint16:2 > # dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport uint16:2 > > So, it?s like the DisplayExport is forcing someway a refresh that is needed by the RemoveExport. Any idea why? > I?m using the latest version of ganesha 2.2.0, i.e. 2.2.0-3.I used the same exact command above (the second one that removes an export) after restarting ganesha, and it just worked fine. I use GPFS FSAL (neither gluster nor VFS). Not sure why you need to use DisplayExport before using RemoveExport. Try to trace 'DBUS' component at FULL_DEBUG (or maybe everything at FULL_DEBUG) and post the log. The error you reported means we are NOT responding to the dbus message which is very odd! Reagrds, Malahal.