Bug 1095775

Summary: Add support in libgfapi to fetch volume info from glusterd.
Product: [Community] GlusterFS Reporter: Kaleb KEITHLEY <kkeithle>
Component: libgfapiAssignee: Soumya Koduri <skoduri>
Status: CLOSED CURRENTRELEASE QA Contact: Sudhir D <sdharane>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: gluster-bugs, kkeithle, sasundar, skoduri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.5.1beta Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1090363 Environment:
Last Closed: 2014-06-24 11:05:10 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:
Bug Depends On: 1090363, 1097603    
Bug Blocks: 1071800    

Description Kaleb KEITHLEY 2014-05-08 13:42:33 UTC
backport from master to release-3.5 branch

+++ This bug was initially created as a clone of Bug #1090363 +++

Description of problem:

Need APIs in libgfapi to fetch volume info (UUID atleast) from glusterd process and return it to the applications. Nfs-Ganesha need this support to read UUID of the volumes which will be used to uniquely identify them.

--- Additional comment from Anand Avati on 2014-04-23 03:45:32 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#17) for review on master by soumya k (skoduri)

--- Additional comment from Anand Avati on 2014-04-25 07:55:43 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#18) for review on master by soumya k (skoduri)

--- Additional comment from Soumya Koduri on 2014-04-25 08:08:35 EDT ---

As part of this fix, we have defined a new RPC which will be invoked from libgfapi to glusterd process to fetch volume info. Incase of any failures while processing this RPC, glfs_init will return error eventually leading to application process to be killed.

And since this support is only needed for NFS-ganesha right now, if any issues are reported by other libgfapi users because of this new RPC added, we will make changes to not to bail out from glfs_init incase of failures reported in this RPC.

Also, we are bumping up the libgfapi version number in this patch. So before merging these changes to downstream, will send another patch to reset the version no.

--- Additional comment from Anand Avati on 2014-04-28 03:55:44 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#19) for review on master by soumya k (skoduri)

--- Additional comment from Anand Avati on 2014-04-28 03:59:45 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#20) for review on master by soumya k (skoduri)

--- Additional comment from Anand Avati on 2014-04-30 06:38:33 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#21) for review on master by soumya k (skoduri)

--- Additional comment from Anand Avati on 2014-04-30 07:35:24 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#22) for review on master by soumya k (skoduri)

--- Additional comment from Anand Avati on 2014-05-02 02:27:19 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#23) for review on master by soumya k (skoduri)

--- Additional comment from Anand Avati on 2014-05-02 05:17:29 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#24) for review on master by soumya k (skoduri)

--- Additional comment from Anand Avati on 2014-05-07 04:37:38 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#25) for review on master by soumya k (skoduri)

--- Additional comment from Anand Avati on 2014-05-07 04:40:57 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#26) for review on master by soumya k (skoduri)

--- Additional comment from Anand Avati on 2014-05-07 05:49:00 EDT ---

REVIEW: http://review.gluster.org/7218 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#27) for review on master by soumya k (skoduri)

Comment 1 Anand Avati 2014-05-12 10:20:51 UTC
REVIEW: http://review.gluster.org/7741 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#1) for review on release-3.5 by soumya k (skoduri)

Comment 2 Anand Avati 2014-05-12 15:12:40 UTC
REVIEW: http://review.gluster.org/7741 (libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.) posted (#2) for review on release-3.5 by Niels de Vos (ndevos)

Comment 3 Anand Avati 2014-05-12 15:15:00 UTC
COMMIT: http://review.gluster.org/7741 committed in release-3.5 by Niels de Vos (ndevos) 
------
commit 0c87b67ba9659a2d029d8136835331301b7b6ceb
Author: Soumya Koduri <skoduri>
Date:   Mon May 12 15:46:57 2014 +0530

    libgfapi:  Added support to fetch volume info from glusterd and store in glfs object.
    
    Defined new APIs in the libgfapi module, given a glfs object,
     * to send handshake RPC call to glusterd process to fetch UUID of the volume
     * store it in the glusterfs_context linked to the glfs object.
     * to parse UUID from its cannonical string format into 16-byte array
       before sending it to the libgfapi users.
    
    Defined a RPC call in glusterd which can be used to query volume related
    info by other processes using 'clnt_handshake_procs'.
    
    Note - Currently this RPC call to glusterd process is used only to fetch UUID.
    But it can be extended to get other volume related structures as well.
    
    In addition to the above, defined a new variable to keep track of such handshake
    RPCs still in progress to make sure all the corresponding RPC callbacks have been
    processed before libgfapi returns the glfs object initialized.
    
    Also bumping up the GFAPI current version number since there is a new API
    "glfs_get_volume_id" defined and exposed by libgfapi as part of these changes.
    
    Cherry picked from commit 5adb10b9ac1c634334f29732e062b12d747ae8c5:
    > Change-Id: I303f76d7177d32d25bdb301b1dbcf5cd73f42807
    > BUG: 1095775
    > Signed-off-by: Soumya Koduri <skoduri>
    > Reviewed-on: http://review.gluster.org/7218
    > Reviewed-by: Anand Avati <avati>
    > Reviewed-by: Harshavardhana <harsha>
    > Tested-by: Gluster Build System <jenkins.com>
    > Reviewed-by: Vijay Bellur <vbellur>
    
    This change differs a little from the patch in the master branch:
    - libgfapi in 3.5 does not have glfs_get_volfile(), so there were some
      merge conflicts resolved,
    - libgfapi in 3.5 is not versioned, the configure.ac changes related to
      the versioning have been skipped,
    - in the master branch only the XDR .x files are available, release-3.5
      requires a manual re-generation of the relates .h and .c files.
    
    Change-Id: I52c32d0e69a52a7f4285f74164bca6fd83c4f3b3
    BUG: 1095775
    Signed-off-by: Soumya Koduri <skoduri>
    Reviewed-on: http://review.gluster.org/7741
    Reviewed-by: Niels de Vos <ndevos>
    Tested-by: Niels de Vos <ndevos>

Comment 4 Niels de Vos 2014-05-25 09:08:07 UTC
The first (and last?) Beta for GlusterFS 3.5.1 has been released [1]. Please verify if the release solves this bug report for you. In case the glusterfs-3.5.1beta release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-May/040377.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 5 Niels de Vos 2014-06-24 11:05:10 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.5.1, please reopen this bug report.

glusterfs-3.5.1 has been announced on the Gluster Users mailinglist [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-June/040723.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user