Bug 998778

Summary: glfs_init does not setup errno when it fails
Product: Red Hat Enterprise Linux 6 Reporter: Asias He <asias>
Component: glusterfsAssignee: Vijay Bellur <vbellur>
Status: CLOSED ERRATA QA Contact: SATHEESARAN <sasundar>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, amarts, areis, asias, barumuga, bsarathy, bturner, chayang, huding, juzhang, mazhang, mkenneth, qzhang, sasundar, sdharane, shaines, tlavigne, vbellur, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.0.34rhs-1.el6 Doc Type: Bug Fix
Doc Text:
Cause: it is important to have 'errno' set to appropriate value when a failure of a API happens. Consequence: application using the API can behave unpredictably if the value is not set during failure. Fix: Set 'errno' values in all the failure path. Result: Now, the application consuming the API will behave properly.
Story Points: ---
Clone Of: 996831 Environment:
Last Closed: 2013-11-21 11:59:14 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:    
Bug Blocks: 996829, 1001893    

Comment 2 Ademar Reis 2013-09-11 01:13:52 UTC
Adding blocker flag. We'll have a hard time supporting gluster customers using qemu-kvm if this bug is not fixed.

Comment 3 Vijay Bellur 2013-09-24 14:48:39 UTC
Patch posted at:

https://code.engineering.redhat.com/gerrit/#/c/12073/

Comment 5 SATHEESARAN 2013-10-09 06:45:34 UTC
With the glusterfs-3.4.0.34rhs-1 update, I am not seeing this issue.
Tested with RHEL 6.5 Beta
Marking it as VERIFIED

Version Info
============

[root@rhs-client8 ~]# rpm -qa | grep qemu
qemu-kvm-tools-0.12.1.2-2.406.el6.x86_64
gpxe-roms-qemu-0.9.7-6.10.el6.noarch
qemu-kvm-0.12.1.2-2.406.el6.x86_64
qemu-img-0.12.1.2-2.406.el6.x86_64

[root@rhs-client8 ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.5 Beta (Santiago)
Kernel \r on an \m

[root@rhs-client8 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 Beta (Santiago)
[root@rhs-client8 ~]# rpm -qa | grep glusterfs
glusterfs-libs-3.4.0.34rhs-1.el6.x86_64
glusterfs-fuse-3.4.0.34rhs-1.el6.x86_64
glusterfs-3.4.0.34rhs-1.el6.x86_64
glusterfs-api-devel-3.4.0.34rhs-1.el6.x86_64
glusterfs-rdma-3.4.0.34rhs-1.el6.x86_64
glusterfs-api-3.4.0.34rhs-1.el6.x86_64
glusterfs-devel-3.4.0.34rhs-1.el6.x86_64

Steps
======
[root@rhs-client8 ~]# /usr/libexec/qemu-kvm  -drive file=gluster://glusterfs-server/simple/rhel64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=0 
qemu-kvm: -drive file=gluster://glusterfs-server/simple/rhel64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads: Gluster connection failed for server=glusterfs-server port=0 volume=simple image=rhel64.qcow2 transport=tcp

qemu-kvm: -drive file=gluster://glusterfs-server/simple/rhel64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads: could not open disk image gluster://glusterfs-server/simple/rhel64.qcow2: Transport endpoint is not connected
[root@rhs-client8 ~]# glusterfs -V
glusterfs 3.4.0.34rhs built on Oct  8 2013 02:04:48
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2013 Red Hat, Inc. <http://www.redhat.com/>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.

Comment 6 errata-xmlrpc 2013-11-21 11:59:14 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.

http://rhn.redhat.com/errata/RHBA-2013-1641.html