-
Notifications
You must be signed in to change notification settings - Fork 51
OCPBUGS-69436: Fix for must-gather scripting #1843
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
base: main
Are you sure you want to change the base?
Conversation
…ate namespace based on the csv object installed. - Modified the way of detecting the namespace in case that the operator is running in several namespaces.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1843 +/- ##
=======================================
Coverage 48.63% 48.63%
=======================================
Files 52 52
Lines 3709 3709
=======================================
Hits 1804 1804
Misses 1754 1754
Partials 151 151 🚀 New features to boost your workflow:
|
- Pulled latest changes
|
@deik0: No Jira issue with key OCPEDGE-69436 exists in the tracker at https://issues.redhat.com/. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
@deik0: This pull request references Jira Issue OCPBUGS-69436, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/assign @suleymanakbas91 @qJkee @jeff-roche |
|
@deik0 running the precommit-hooks should resolve your end of line issue in the precommit-check, otherwise lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deik0 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/retest |
|
@deik0: The following tests 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-sigs/prow repository. I understand the commands that are listed here. |
| for command_desc in "${commands_desc[@]}"; do | ||
| echo "collecting oc describe command ${command_desc}" | tee -a "${BASE_COLLECTION_PATH}/gather-debug.log" | ||
| COMMAND_OUTPUT_FILE=${BASE_COLLECTION_PATH}/namespaces/${INSTALL_NAMESPACE}/oc_output/${command_desc// /_} | ||
| COMMAND_OUTPUT_FILE=${BASE_COLLECTION_PATH}/namespaces/${ns}/oc_output/${command_desc// /_} |
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.
| COMMAND_OUTPUT_FILE=${BASE_COLLECTION_PATH}/namespaces/${ns}/oc_output/${command_desc// /_} | |
| COMMAND_OUTPUT_FILE=${BASE_COLLECTION_PATH}/namespaces/${NAMESPACE}/oc_output/${command_desc// /_} |
| for resource in "${resources[@]}"; do | ||
| echo "collecting dump of ${resource}" | tee -a "${BASE_COLLECTION_PATH}/gather-debug.log" | ||
| { oc adm --dest-dir="${BASE_COLLECTION_PATH}/namespaces/all/" inspect "${resource}" --all-namespaces ${log_collection_args}; } >>"${BASE_COLLECTION_PATH}/gather-debug.log" 2>&1 | ||
| { oc adm --dest-dir="${BASE_COLLECTION_PATH}/namespaces/${NAMESPACE}/" inspect "${resource}" --all-namespaces ${log_collection_args}; } >>"${BASE_COLLECTION_PATH}/gather-debug.log" 2>&1 |
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.
This runs on all namespaces to fetch all the LVMCluster objects in the cluster. Is there a reason to change this to namespace-only?
| echo "collecting dump of namespace" | tee -a "${BASE_COLLECTION_PATH}"/gather-debug.log | ||
| oc adm --dest-dir="${BASE_COLLECTION_PATH}" inspect ns/"${INSTALL_NAMESPACE}" ${log_collection_args} >>"${BASE_COLLECTION_PATH}"/gather-debug.log 2>&1 | ||
|
|
||
| for NAMESPACE in "${INSTALL_NAMESPACE[@]}"; do |
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.
Instead of having many for loops for namespaces throughout the file, we can have the one here which ends right before the collection of cluster-wide objects.
Changed the must-gather namespaced data collection with the following:
Previously only data was collected from "openshift-lvm-storage", now it will collect from the namespace where the csv object for the operator is installed, this should cover old installations for "openshift-storage" and future installation where it might be in a different(custom) namespace.
In the case that the operator is installed with a csv in any other namespace it will also collect data from that namespace.
This should solve: https://issues.redhat.com/browse/OCPBUGS-69401 plus also considering scenarios where the operator is installed in more than one namespace.