Must-gather: add bg process for ceph cmds#1048
Must-gather: add bg process for ceph cmds#1048openshift-merge-robot merged 2 commits intored-hat-storage:masterfrom
Conversation
jarrpa
left a comment
There was a problem hiding this comment.
In general this makes sense, but there's still a problem with the logging. By outputting the stdout of multiple background processes to the same log file there is no guarantee that the output lines will be coherent since multiple jobs could output lines between each other. You should output each command's stdout to separate files, then later aggregate them into the main debug log. If they're all in the same directory you don't need to worry about the exact file names, just loop over all files in the directory.
4a777df to
0ad277b
Compare
|
@crombus: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
0ad277b to
b6d2a46
Compare
|
@jarrpa I didn’t cat the output of logs in gather-debug.log. Reason they are still up and down it ls not in order. I suggest to have it in the log folder unless you have some other suggestions. |
jarrpa
left a comment
There was a problem hiding this comment.
I think it's totally okay if they're not in the same file. However, given that, it may just be easier to have both stdout and stderr output to the same file regardless. I can imagine someone looking through must-gather would find it convenient if they just had one file to determine the output (successful or failure) of a single command. Thoughts?
Also, merge the first and last commits.
| ceph_collection(){ | ||
| COMMAND_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/must_gather_commands | ||
| COMMAND_JSON_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/must_gather_commands_json_output | ||
| COMMAND_LOG_OUTPUT_DIR=${CEPH_COLLECTION_PATH}/logs |
There was a problem hiding this comment.
I think it might make sense to name this COMMAND_ERR_OUTPUT_DIR? The main purpose of this is to collect the output to fd 2, right?
There was a problem hiding this comment.
yes. I'll update it
As of now if the cmd has failed then the file will be empty and will be removed at end by MG. For end user we are providing just the data which was collected. If at any point the data is not collected or cmd failed to find the reason we look in gather-debug.log. I understand your point but in that case to list which cmds fail and which passed will be difficult as they will not be in one location. We have to check each file to find that it is failed or passed.
|
add bg process for ceph cmds. create temp log file for ceph bg cmds and cat them to gather-debug.log file. create err log file for each bg ceph cmd. Signed-off-by: crombus <pkundra@redhat.com>
Signed-off-by: crombus <pkundra@redhat.com> (cherry picked from commit 1820d61)
b6d2a46 to
ec6d471
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jarrpa, rajatsing The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
A solid argument, thanks! |
|
/cherry-pick release-4.7 |
|
@crombus: new pull request created: #1082 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
add bg process for ceph cmds. create
temp log file for ceph bg cmds and
cat them to gather-debug.log file.
Signed-off-by: crombus pkundra@redhat.com