Bug 860212 - libgfapi: Fix errno value from glfs_init()
Summary: libgfapi: Fix errno value from glfs_init()
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: Vijay Bellur
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-25 09:31 UTC by Bharata B Rao
Modified: 2014-04-17 13:12 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.4.3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-17 13:12:20 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Bharata B Rao 2012-09-25 09:31:42 UTC
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 09:09:44 UTC
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 05:49:00 UTC
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 15:19:21 UTC
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 15:23:55 UTC
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 20:04:03 UTC
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 08:29:00 UTC
The segmentation faults seen by QEMU is now fixed with the above commit.

Comment 7 Anand Avati 2013-08-28 03:51:52 UTC
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 07:37:12 UTC
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 13:23:47 UTC
Moving to verified as per c6.

Comment 10 Niels de Vos 2014-04-17 13:12:20 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.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.