Improve the handling of stdout and stderr in daemon mode#219
Open
gulams wants to merge 1 commit intoopen-iscsi:masterfrom
Open
Improve the handling of stdout and stderr in daemon mode#219gulams wants to merge 1 commit intoopen-iscsi:masterfrom
gulams wants to merge 1 commit intoopen-iscsi:masterfrom
Conversation
In daemon mode, the STDOUT and STDERR messages were aggregated into a single text file which was then relayed back to the caller. There was no differentiation between the STDOUT and STDERR which caused it to return 0 and not log any STDERR even in command failure case. Following is an example: $ targetcli get global auto_use_daemon auto_use_daemon=true $ targetcli err; echo $? Command not found err 0 The fix is to create separate temp files for stdout and stderr. After the fix it returns error correctly (1): $ targetcli get global auto_use_daemon auto_use_daemon=true $ targetcli err; echo $? Command not found err 1 Signed-off-by: Joshua Brown <joshua.f.brown@oracle.com> Signed-off-by: Gulam Mohamed <gulam.mohamed@oracle.com>
Author
|
Can anybody review this and let us know the comments? |
Collaborator
Going to look at it |
Collaborator
|
FYI, I didn't forget about it, I am investigating a failure that happens with the latest versions where in some cases I am unable to set the "auto_use_daemon" to true. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In daemon mode, the STDOUT and STDERR messages were aggregated into a single text file which was then relayed back to the caller. There was no differentiation between the STDOUT and STDERR which caused it to return 0 and not log any STDERR even in command failure case. Following is an example:
$ targetcli get global auto_use_daemon
auto_use_daemon=true
$ targetcli err; echo $?
Command not found err
0
The fix is to create separate temp files for stdout and stderr.
After the fix it returns error correctly (1):
$ targetcli get global auto_use_daemon
auto_use_daemon=true
$ targetcli err; echo $?
Command not found err
1