Bug 1202492 - Rewrite glfs_new function for better error out scenarios.
Summary: Rewrite glfs_new function for better error out scenarios.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi
Version: pre-release
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-16 18:13 UTC by Humble Chirammal
Modified: 2015-05-14 17:46 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.7.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-14 17:29:21 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Humble Chirammal 2015-03-16 18:13:47 UTC
Description of problem:

Current glfs_new is not flexible enough to error out and destroy the struct members or objects initialized just before the error path/condition. This make the structs or objects to continue or left out with partially recorded data and cause crashes/issues later in the code path or in other words, its not the proper way of doing things.  

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

GlusterFS 3.6.2

How reproducible:

N/A

Steps to Reproduce:
N/A

Actual results:

N/A
Expected results:

There should be proper error out path in the subjected function.
Additional info:

Comment 1 Anand Avati 2015-03-16 18:14:44 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function.) posted (#1) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 2 Anand Avati 2015-03-16 18:22:11 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function.) posted (#2) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 3 Anand Avati 2015-03-17 05:38:13 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function.) posted (#3) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 4 Anand Avati 2015-03-20 13:30:26 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function.) posted (#4) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 5 Anand Avati 2015-03-20 13:38:09 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function.) posted (#5) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 6 Anand Avati 2015-03-20 13:41:51 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function.) posted (#6) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 7 Anand Avati 2015-03-20 15:55:28 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function.) posted (#7) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 8 Anand Avati 2015-03-20 16:31:10 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function.) posted (#8) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 9 Anand Avati 2015-03-21 06:27:11 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function.) posted (#9) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 10 Anand Avati 2015-03-21 09:04:50 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function) posted (#10) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 11 Anand Avati 2015-03-22 08:01:22 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function.) posted (#11) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 12 Anand Avati 2015-03-24 11:05:43 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function) posted (#12) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 13 Anand Avati 2015-03-25 06:40:44 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function) posted (#13) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 14 Anand Avati 2015-03-25 07:15:23 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function) posted (#14) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 15 Anand Avati 2015-03-25 11:08:23 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function) posted (#15) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 16 Anand Avati 2015-03-26 09:20:27 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function) posted (#16) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 17 Anand Avati 2015-03-26 17:08:23 UTC
REVIEW: http://review.gluster.org/9903 (libgfapi: revamp glfs_new function) posted (#17) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 18 Anand Avati 2015-03-30 12:31:39 UTC
COMMIT: http://review.gluster.org/9903 committed in master by Kaleb KEITHLEY (kkeithle) 
------
commit 299f6ce2b17216a6c09d5345139b9a78f7505b24
Author: Humble Devassy Chirammal <hchiramm>
Date:   Fri Mar 20 18:57:52 2015 +0530

    libgfapi: revamp glfs_new function
    
    Current glfs_new() function is not flexible enough to error out
    and destroy the struct members or objects initialized just before the
    error path/condition. This make the structs or objects to continue or
    left out with partially recorded data in fs and ctx structs and cause
    crashes/issues later in the code path. This patch avoid the issue.
    
    Change-Id: Ie4514b82b24723a46681cc7832a08870afc0cb28
    BUG: 1202492
    Signed-off-by: Humble Devassy Chirammal <hchiramm>
    Reviewed-on: http://review.gluster.org/9903
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Poornima G <pgurusid>
    Reviewed-by: soumya k <skoduri>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>

Comment 19 Niels de Vos 2015-05-14 17:29:21 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.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 20 Niels de Vos 2015-05-14 17:35:54 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.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 21 Niels de Vos 2015-05-14 17:38:15 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.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 22 Niels de Vos 2015-05-14 17:46:25 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.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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