-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LOG-6277: Fix LokiStack is not gathered even if it exists. #2845
base: master
Are you sure you want to change the base?
Conversation
@kattz-kawa: This pull request references LOG-6277 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.8.0" version, but no target version was set. In 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 openshift-eng/jira-lifecycle-plugin repository. |
Hi @kattz-kawa. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
@@ -91,7 +91,7 @@ else | |||
log "Skipping collection inspection. No default CLO found" 2>&1 | tee "${LOGFILE_PATH}" | |||
fi | |||
|
|||
loki_crd=$(oc get crd -A -o custom-columns=:.metadata.name | grep lokistack)|| | |||
loki_crd=$(oc get crd -A -o custom-columns=:.metadata.name | grep lokistack)&& |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the correct fix is to have two separate lines and no logical operator or list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your point. It seems I misunderstood the significance of this logical operator. I will fix it into two separate lines and request a review again.
Signed-off-by: Katuya Kawakami <[email protected]> Signed-off-by: Masaki Hatada <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kattz-kawa The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
@kattz-kawa: all tests passed! Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
/hold |
Description
The must-gather code[1] gathers LokiStack only when "lokistack" wasn't found in the result of "oc get crd".
It means that LokiStack isn't gathered even if it exists.
[1]
cluster-logging-operator/must-gather/collection-scripts/gather
Line 94 in b8e2d71
The current line should use && instead of ||. This change is important because, in bash, if the left expression of || is true, the right expression is not evaluated. By using &&, the right expression will be evaluated if LokiStack exists, ensuring that the information is gathered correctly.
Here is an example to demonstrate this point:
/cc @Clee2691
/assign @jcantrill
Links
JIRA: https://issues.redhat.com/browse/LOG-6277