Bug 860212 - libgfapi: Fix errno value from glfs_init()
libgfapi: Fix errno value from glfs_init()
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: libgfapi (Show other bugs)
3.4.0
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Vijay Bellur
Sudhir D
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-25 05:31 EDT by Bharata B Rao
Modified: 2014-04-17 09:12 EDT (History)
4 users (show)

See Also:
Fixed In Version: glusterfs-3.4.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-17 09:12:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Bharata B Rao 2012-09-25 05:31:42 EDT
Description of problem:

glfs_init() returns -1 with errno set to 0 in the following cases:
- when transport=unix is specified,
- when wrong (non-existing) volume name is specified
- when invalid volfile server is specified

glfs_init() could return 1 for failure cases (when volume is not yet started). Document this failure case in glfs.h

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Bharata B Rao 2012-09-26 05:09:44 EDT
Case 3: glfs_init() returns 0 with errno 0 for transport=rdma. This is unexpected I suppose w/o proper rdma support.
Comment 2 Bharata B Rao 2012-11-28 00:49:00 EST
Would this be resolved in GlusterFS-3.4 ? This has ugly effects on QEMU-GlusterFS, any invalid argument specified will lead to QEMU crash due to this bug.
Comment 3 Bharata B Rao 2013-08-20 11:19:21 EDT
Non-existing volume
-------------------
[root@bharata qemu]# gluster volume info test1
Volume test1 does not exist
[root@bharata qemu]# qemu-system-x86_64 --enable-kvm -nographic -smp 4 -m 2048 -drive file=gluster://bharata/test1/F17,if=virtio
qemu-system-x86_64: -drive file=gluster://bharata/test1/F17,if=virtio: Gluster connection failed for server=bharata port=0 volume=test1 image=F17 transport=tcp
Segmentation fault (core dumped)

Invalid server
--------------
[root@bharata qemu]# qemu-system-x86_64 --enable-kvm -nographic -smp 4 -m 2048 -drive file=gluster://bharata-xxxx/test1/F17,if=virtio
qemu-system-x86_64: -drive file=gluster://bharata-xxxx/test1/F17,if=virtio: Gluster connection failed for server=bharata-xxxx port=0 volume=test1 image=F17 transport=tcp
Segmentation fault (core dumped)
Comment 4 Anand Avati 2013-08-25 11:23:55 EDT
REVIEW: http://review.gluster.org/5704 (api: Set errno before invoking glfs_init_done()) posted (#1) for review on master by Vijay Bellur (vbellur@redhat.com)
Comment 5 Anand Avati 2013-08-25 16:04:03 EDT
COMMIT: http://review.gluster.org/5704 committed in master by Anand Avati (avati@redhat.com) 
------
commit cd2537541540074a5db452a49f9be220e3d76d32
Author: Vijay Bellur <vbellur@redhat.com>
Date:   Sun Aug 25 20:51:20 2013 +0530

    api: Set errno before invoking glfs_init_done()
    
    Change-Id: I3f4d3cfaf7078e126881111eb840d854b0b6466d
    BUG: 860212
    Signed-off-by: Vijay Bellur <vbellur@redhat.com>
    Reviewed-on: http://review.gluster.org/5704
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Anand Avati <avati@redhat.com>
Comment 6 Bharata B Rao 2013-08-26 04:29:00 EDT
The segmentation faults seen by QEMU is now fixed with the above commit.
Comment 7 Anand Avati 2013-08-27 23:51:52 EDT
REVIEW: http://review.gluster.org/5711 (api: Set errno before invoking glfs_init_done()) posted (#1) for review on release-3.4 by Vijay Bellur (vbellur@redhat.com)
Comment 8 Anand Avati 2013-09-06 03:37:12 EDT
COMMIT: http://review.gluster.org/5711 committed in release-3.4 by Vijay Bellur (vbellur@redhat.com) 
------
commit 1ad4d0457da4366028affffddb6fa1d3725ef22e
Author: Vijay Bellur <vbellur@redhat.com>
Date:   Sun Aug 25 20:51:20 2013 +0530

    api: Set errno before invoking glfs_init_done()
    
    Change-Id: I3f4d3cfaf7078e126881111eb840d854b0b6466d
    BUG: 860212
    Signed-off-by: Vijay Bellur <vbellur@redhat.com>
    Reviewed-on: http://review.gluster.org/5711
    Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
Comment 9 Vijay Bellur 2013-09-24 09:23:47 EDT
Moving to verified as per c6.
Comment 10 Niels de Vos 2014-04-17 09:12:20 EDT
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.4.3, please reopen this bug report.

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

The fix for this bug likely to be included in all future GlusterFS releases i.e. release > 3.4.3. In the same line the recent release i.e. glusterfs-3.5.0 [3] likely to have the fix. You can verify this by reading the comments in this bug report and checking for comments mentioning "committed in release-3.5".

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/5978
[2] http://news.gmane.org/gmane.comp.file-systems.gluster.user
[3] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137

Note You need to log in before you can comment on or make changes to this bug.