Bug 1389661

Summary: Refresh config fails while exporting subdirectories within a volume
Product: Red Hat Gluster Storage Reporter: Arthy Loganathan <aloganat>
Component: common-haAssignee: Jiffin <jthottan>
Status: CLOSED ERRATA QA Contact: Arthy Loganathan <aloganat>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.2CC: amukherj, jthottan, kkeithle, mzywusko, ndevos, rhinduja, rhs-bugs, skoduri, storage-qa-internal
Target Milestone: ---   
Target Release: RHGS 3.2.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.8.4-6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1389746 (view as bug list) Environment:
Last Closed: 2017-03-23 06:15:39 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:
Bug Depends On:    
Bug Blocks: 1351528, 1389746, 1396332, 1399635, 1405918    
Attachments:
Description Flags
ganesha.log none

Description Arthy Loganathan 2016-10-28 07:00:04 UTC
Description of problem:
Refresh config failed while exporting subdirectories within a volume.

Version-Release number of selected component (if applicable):
nfs-ganesha-2.4.0-2.el7rhgs.x86_64
glusterfs-server-3.8.4-3.el7rhgs.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Create a ganesha cluster, create a volume and enable nfs-ganesha on that volume.
2. Mount the volume and create subdirectories.
3. Edit the export.conf file to export subdirectories within the volume.
    conf file path: /var/run/gluster/shared_storage/nfs-ganesha/exports/export.testvol1.conf
4. Run refresh config.
    /usr/libexec/ganesha/ganesha-ha.sh --refresh-config /var/run/gluster/shared_storage/nfs-ganesha/ testvol1

Actual results:

Refresh config failed.

Expected results:
Refresh config should succeed and subdirectory should be exported.

Additional info:

Edited export.conf file:
-------------------------

EXPORT{
      Export_Id = 2;
      Path = "/testvol1/user2/dir0";
      FSAL {
           name = GLUSTER;
           hostname="localhost";
          volume="testvol1";
          volpath="/user2/dir0";
           }
      Access_type = RW;
      Disable_ACL = true;
      Squash="No_root_squash";
      Pseudo="/testvol1_ps";
      Protocols = "3", "4" ;
      Transports = "UDP","TCP";
      SecType = "sys";
     }


Error message in command prompt:
--------------------------------

[root@dhcp47-155 ~]# /usr/libexec/ganesha/ganesha-ha.sh --refresh-config /var/run/gluster/shared_storage/nfs-ganesha/ testvol1
Error: refresh-config failed on dhcp46-101.
[root@dhcp47-155 ~]# 


ganesha.log log snippet:
-------------------------

28/10/2016 11:36:09 : epoch 40270000 : dhcp46-101.lab.eng.blr.redhat.com : ganesha.nfsd-22434[dbus_heartbeat] dbus_message_entrypoint :DBUS :MAJ :Method (RemoveExport) on (org.ganesha.nfsd.exportmgr) failed: name = (org.freedesktop.DBus.Error.InvalidArgs), message = (lookup_export failed with Export id not found)

Comment 2 Arthy Loganathan 2016-10-28 07:00:45 UTC
Created attachment 1214854 [details]
ganesha.log

Comment 3 Jiffin 2016-10-28 12:17:07 UTC
The patch posted upstream for review

Comment 6 Jiffin 2016-11-15 06:45:25 UTC
Upstream patch link : http://review.gluster.org/15751

Comment 7 Jiffin 2016-11-18 07:07:46 UTC
The patch got merged master upstream

Downstream patch link https://code.engineering.redhat.com/gerrit/90524

Comment 9 Arthy Loganathan 2016-12-08 06:57:30 UTC
[root@dhcp46-42 ~]# cat /run/gluster/shared_storage/nfs-ganesha/exports/export.vol2.conf # WARNING : Using Gluster CLI will overwrite manual
# changes made to this file. To avoid it, edit the
# file and run ganesha-ha.sh --refresh-config.
EXPORT{
      Export_Id = 2;
      Path = "/vol2/subdir1";
      FSAL {
           name = GLUSTER;
           hostname="localhost";
          volume="vol2";
          volpath="/subdir1";
           }
      Access_type = RW;
      Disable_ACL = true;
      Squash="No_root_squash";
      Pseudo="/vol2/subdir1";
      Protocols = "3","4" ;
      Transports = "UDP","TCP";
      SecType = "sys";
     }
[root@dhcp46-42 ~]#
[root@dhcp46-42 ~]# /usr/libexec/ganesha/ganesha-ha.sh --refresh-config /var/run/gluster/shared_storage/nfs-ganesha/ vol2
Refresh-config completed on dhcp46-101.
Refresh-config completed on dhcp47-155.
Refresh-config completed on dhcp47-167.
Success: refresh-config completed.


Verified the fix in build,
glusterfs-ganesha-3.8.4-7.el7rhgs.x86_64
nfs-ganesha-2.4.1-2.el7rhgs.x86_64
nfs-ganesha-gluster-2.4.1-2.el7rhgs.x86_64

Comment 11 errata-xmlrpc 2017-03-23 06:15:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0486.html