Skip to content

Conversation

@deik0
Copy link

@deik0 deik0 commented Dec 16, 2025

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.

miguel and others added 2 commits December 16, 2025 10:11
…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.
@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 16, 2025
@deik0 deik0 marked this pull request as draft December 16, 2025 13:17
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 16, 2025
@deik0 deik0 marked this pull request as ready for review December 16, 2025 13:18
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 16, 2025
@openshift-ci openshift-ci bot requested review from jaypoulz and pacevedom December 16, 2025 13:19
@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.23%. Comparing base (05658af) to head (2aa1b3a).
⚠️ Report is 204 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1843      +/-   ##
==========================================
- Coverage   48.63%   48.23%   -0.41%     
==========================================
  Files          52       52              
  Lines        3709     3709              
==========================================
- Hits         1804     1789      -15     
- Misses       1754     1768      +14     
- Partials      151      152       +1     

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jeff-roche jeff-roche changed the title Fix for must-gather scripting OCPEDGE-69436: Fix for must-gather scripting Dec 16, 2025
@openshift-ci-robot
Copy link

@deik0: No Jira issue with key OCPEDGE-69436 exists in the tracker at https://issues.redhat.com/.
Once a valid jira issue is referenced in the title of this pull request, request a refresh with /jira refresh.

Details

In response to this:

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.

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.

@jeff-roche jeff-roche changed the title OCPEDGE-69436: Fix for must-gather scripting OCPBUGS-69436: Fix for must-gather scripting Dec 16, 2025
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Dec 16, 2025
@openshift-ci-robot
Copy link

@deik0: This pull request references Jira Issue OCPBUGS-69436, which is invalid:

  • expected the bug to target either version "4.22." or "openshift-4.22.", but it targets "4.21.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

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.

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.

@jeff-roche
Copy link
Contributor

/assign @suleymanakbas91 @qJkee @jeff-roche

@jeff-roche
Copy link
Contributor

jeff-roche commented Dec 16, 2025

@deik0 running the precommit-hooks should resolve your end of line issue in the precommit-check, otherwise lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 16, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deik0
Once this PR has been reviewed and has the lgtm label, please ask for approval from jeff-roche. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jeff-roche
Copy link
Contributor

/retest

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
Copy link
Contributor

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that is working as expected.
Based on this:

# Resource List
resources=()
# collect lvmcluster resources
#resources+=(lvmclusters)

It looks like it's never initialized properly, hence when executing that part it will not collecting anything.
I've tested this recently:

$ cat lvm-test.logs  | grep "collecting dump of"
[must-gather-6pxtp] POD 2025-12-25T10:31:45.252310962Z collecting dump of namespace
[must-gather-6pxtp] POD 2025-12-25T10:31:46.730431061Z collecting dump of clusterresourceversion
[must-gather-6pxtp] POD 2025-12-25T10:31:52.458643433Z collecting dump of oc get pvc all namespaces
[must-gather-6pxtp] POD 2025-12-25T10:31:53.030236440Z collecting dump of snapshot information for all namespaces
$ oc get lvmcluster -n openshift-storage
NAME            STATUS
my-lvmcluster   Failed

And, unless I'm missing something, it's not getting triggered as the resource list is empty.

Regardless of the above, with this change, the script should be able to collect lvmcluster objects in every namespace that they are available(considering that a CSV object exist in them,plus any other resource that might have been configured).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. Would you be so kind to remove it all together then?

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
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I totally agree that single run for each project would be a better approach, we can change it, I was trying to avoid a major change while maintaining current structure when the data is collected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll just make the code shorter but it's not a big deal. I'm ok for both approaches.

Copy link
Contributor

@qJkee qJkee Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd like to see that we are checking only one namespace to avoid confuses in future
Also, because of this, we have to have for loop everywhere

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd like to see that we are checking only one namespace to avoid confuses in future

Can you elaborate a bit more on this?

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 8, 2026

@deik0: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws 2aa1b3a link true /test e2e-aws

Full PR test history. Your PR dashboard.

Details

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants