Bug 1464402 - gluster-block: system() check for WIFEXITED before WEXITSTATUS
Summary: gluster-block: system() check for WIFEXITED before WEXITSTATUS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: gluster-block
Version: rhgs-3.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHGS 3.3.0
Assignee: Prasanna Kumar Kalever
QA Contact: Sweta Anandpara
URL:
Whiteboard:
Depends On:
Blocks: 1417151
TreeView+ depends on / blocked
 
Reported: 2017-06-23 11:05 UTC by Prasanna Kumar Kalever
Modified: 2017-09-21 04:19 UTC (History)
5 users (show)

Fixed In Version: gluster-block-0.2.1-2.el7rhgs
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-21 04:19:33 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:2773 0 normal SHIPPED_LIVE new packages: gluster-block 2017-09-21 08:16:22 UTC

Description Prasanna Kumar Kalever 2017-06-23 11:05:41 UTC
Description of problem:

Fix bug in gbRunner() function, which basically execute a command given as part of argument using system() call.

The return value of system() need to defended with WIFEXITED to check check if the child terminated normally before checking for exit status of the child using WEXITSTATUS.

Consequence in absence of this fix will be ending up with an exit value without knowing the proper reason of failure for a given command.

Comment 8 Sweta Anandpara 2017-07-14 06:14:49 UTC
Prasanna, Please refer comment7.

Comment 10 Sweta Anandpara 2017-07-17 07:32:37 UTC
The steps that are mentioned in comment 9 will not pan out that way. 

gluster-block is dependent on tcmu-runner, which in turn is dependent on targetcli. Hence, removal of targetcli will trigger the removal of tcmu-runner AND thus, gluster-block - which, if done, step2 of executing gluster-block commands cannot take place.

Thoughts, Prasanna?

Comment 14 Sweta Anandpara 2017-08-03 09:33:06 UTC
Having discussed it with Prasanna, we can confidently claim that gbRunner() is working correctly with the output that is seen in comment12. 

Moving this bug to verified in 3.3.0.

Comment 16 errata-xmlrpc 2017-09-21 04:19:33 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.

https://access.redhat.com/errata/RHEA-2017:2773


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