Red Hat Bugzilla – Bug 1464402
gluster-block: system() check for WIFEXITED before WEXITSTATUS
Last modified: 2017-09-21 00:19:33 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.
Prasanna, Please refer comment7.
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.
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.
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.