Bug 1464402 - gluster-block: system() check for WIFEXITED before WEXITSTATUS
gluster-block: system() check for WIFEXITED before WEXITSTATUS
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: gluster-block (Show other bugs)
3.3
Unspecified Unspecified
unspecified Severity unspecified
: ---
: RHGS 3.3.0
Assigned To: Prasanna Kumar Kalever
Sweta Anandpara
:
Depends On:
Blocks: 1417151
  Show dependency treegraph
 
Reported: 2017-06-23 07:05 EDT by Prasanna Kumar Kalever
Modified: 2017-09-21 00:19 EDT (History)
5 users (show)

See Also:
Fixed In Version: gluster-block-0.2.1-2.el7rhgs
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-09-21 00:19:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Prasanna Kumar Kalever 2017-06-23 07:05:41 EDT
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 02:14:49 EDT
Prasanna, Please refer comment7.
Comment 10 Sweta Anandpara 2017-07-17 03:32:37 EDT
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 05:33:06 EDT
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 00:19:33 EDT
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.